33#include <Pt/StreamBuffer.h>
37typedef struct z_stream_s z_stream;
110 std::size_t
zcount()
const {
return _zcount; }
116 std::streamsize
import(std::streamsize maxImport = 0);
118 std::streamsize
import(
const char* data, std::streamsize size);
122 virtual std::streamsize showmanyc();
131 virtual int_type underflow();
134 virtual int_type overflow(int_type ch);
137 void inflateBuffer();
144 static const int _pbmax = 4;
145 static const int _bufmax = 4096;
148 static const int _zbufmax = 4096;
149 char _zbuf[_zbufmax];
BasicStreamBuffer()
Definition StreamBuffer.h:139
void attach(std::ios &target)
Attach to target stream.
void reset(std::ios &target)
Attach to target stream, discard the buffer and reset the state.
virtual ~ZBuffer()
Destructor.
void discard()
Discards the buffer content and resets the state.
virtual std::streamsize showfull()
Returns the number of characters buffered for output.
void finish()
Finish and flush remaining data to the target stream.
std::size_t zcount() const
Returns the total number of decompressed bytes produced so far.
Definition ZBuffer.h:110
Format
Compression/decompression format.
Definition ZBuffer.h:67
@ Zlib
zlib header/trailer with Adler-32 checksum.
Definition ZBuffer.h:68
@ Gzip
gzip header/trailer with CRC-32 checksum (RFC 1952).
Definition ZBuffer.h:69
void detach()
Detach from target stream.
ZBuffer(std::ios &ios, Format fmt=Zlib)
Construct with target stream.
void reset()
Detach from target stream, discard the buffer and reset the state.
ZBuffer(Format fmt=Zlib)
Default Constructor.
Core module.
Definition Allocator.h:33