SHORE API
|
GZIP compress a stream in blocks. More...
Public Types | |
enum | HeaderType { HEADER_RAW =-1, HEADER_ZLIB =0, HEADER_GZIP =16 } |
Types of stream headers that can be written. | |
enum | Strategy { STGY_DEFAULT =Z_DEFAULT_STRATEGY, STGY_FILTERED =Z_FILTERED, STGY_HUFFMAN =Z_HUFFMAN_ONLY, STGY_RLE =Z_RLE, STGY_FIXED =Z_FIXED } |
Possible compression strategies. | |
Public Member Functions | |
gzxdeflater (std::ostream &os, const bool syncblocks=true, const size_t bs=131072, const HeaderType ht=HEADER_GZIP, const Strategy sg=STGY_DEFAULT) | |
Constructor: init encoder. | |
~gzxdeflater () | |
Destructor: calls finish(). | |
void | finish () |
Finish encoding and free buffers, append the index. | |
void | write (const char *s, size_t n) |
Append a block of data. | |
const gzxindex & | get_syncs () const |
Get the index. | |
Additional Inherited Members | |
![]() | |
void | z_error (const std::string &msg) |
Report & throw. | |
void | zstat_error (const std::string &msg) |
Report together with zlib error status & throw. | |
![]() | |
int | m_zstat |
zlib error status. | |
GZIP compress a stream in blocks.