ZIStream Class Reference

#include <Pt/ZStream.h>

Input stream for zlib compression.

Inherits BasicIStream< char >.

Public Member Functions

 ZIStream ()
 Construct with target stream.
 
 ZIStream (std::istream &is)
 Construct with target stream.
 
 ~ZIStream ()
 Destructor.
 
void attach (std::istream &is)
 Attach to target stream.
 
BasicStreamBuffer< char > * buffer ()
 Returns the buffer.
 
void detach ()
 Detach from target stream.
 
void finish ()
 Finish and flush remaining data to the target stream.
 
std::streamsize peeksome (char *buffer, std::streamsize n)
 Peeks bytes in the stream buffer. More...
 
void reset ()
 Reset to begin new compression/decompression.
 
void reset (std::istream &is)
 Reset to begin new compression/decompression.
 
void setBuffer (BasicStreamBuffer< char > *sb)
 Sets the buffer.
 
ZBufferzBuffer ()
 Returns the compression buffer.
 

Member Function Documentation

std::streamsize peeksome ( char *  buffer,
std::streamsize  n 
)
inherited

The number of bytes that can be peeked depends on the current stream buffer get area and maybe less than requested, similar to istream::readsome().