25 #include <cppmyth_config.h> 36 typedef int(*STREAM_READER)(
void *handle,
void *buf,
int sz);
38 Compressor(STREAM_READER reader,
void *handle,
int level = -1);
39 Compressor(
const char *input,
size_t len,
int level = -1);
40 virtual ~Compressor();
97 STREAM_READER m_rstream;
107 static int _init(
void *zp,
void *out,
size_t len,
int level);
115 typedef int(*STREAM_READER)(
void *handle,
void *buf,
int sz);
118 Decompressor(
const char *input,
size_t len);
119 virtual ~Decompressor();
175 STREAM_READER m_rstream;
185 static int _init(
void *zp,
void *out,
size_t len);
bool HasBufferError()
Data cannot be read from input.
bool HasOutputData()
More data can be read from output stream.
bool HasStreamError()
Data error occurred from stream.
size_t FetchOutput(const char **data)
Fetch next chunk of data from output stream. No copy of data is performed and result can be used as i...
size_t ReadOutput(char *buf, size_t len)
Copy data from output stream to the given pointer until size limit.
bool HasOutputData()
More data can be read from output stream.
bool IsCompleted()
Output stream is completed.