33 #include <Pt/StreamBuffer.h>
37 typedef struct z_stream_s z_stream;
92 std::size_t
zcount()
const {
return _zcount; }
98 std::streamsize
import(std::streamsize maxImport = 0);
100 std::streamsize
import(
const char* data, std::streamsize size);
104 virtual std::streamsize showmanyc();
113 virtual int_type underflow();
116 virtual int_type overflow(int_type ch);
119 void inflateBuffer();
126 static const int _pbmax = 4;
127 static const int _bufmax = 4096;
130 static const int _zbufmax = 4096;
131 char _zbuf[_zbufmax];
139 #endif // PT_ZBUFFER_H
Core module.
Definition: Allocator.h:33
ZBuffer(std::ios &ios, Format fmt=Zlib)
Construct with target stream.
Stream buffer for zlib compression.
Definition: ZBuffer.h:44
void reset()
Detach from target stream, discard the buffer and reset the state.
virtual std::streamsize showfull()
Returns the number of characters buffered for output.
ZBuffer(Format fmt=Zlib)
Default Constructor.
void detach()
Detach from target stream.
virtual ~ZBuffer()
Destructor.
void discard()
Discards the buffer content and resets the state.
void attach(std::ios &target)
Attach to target stream.
void finish()
Finish and flush remaining data to the target stream.
Format
Compression/decompression format.
Definition: ZBuffer.h:49
Buffer for input and output streams.
Definition: StreamBuffer.h:52
void reset(std::ios &target)
Attach to target stream, discard the buffer and reset the state.
std::size_t zcount() const
Returns the total number of decompressed bytes produced so far.
Definition: ZBuffer.h:92