#include <Pt/ZStream.h>
I/O stream for zlib compression.
Inherits BasicIOStream< char >.
Public Member Functions | |
ZIOStream () | |
Construct with target stream. | |
ZIOStream (std::iostream &ios) | |
Construct with target stream. | |
~ZIOStream () | |
Destructor. | |
void | attach (std::iostream &ios) |
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::iostream &ios) |
Reset to begin new compression/decompression. | |
void | setBuffer (BasicStreamBuffer< char > *sb) |
Sets the buffer. | |
std::streamsize | writesome (char *buffer, std::streamsize n) |
Write as much data as fits in buffer. | |
ZBuffer & | zBuffer () |
Returns the compression buffer. | |
|
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().