#include <deflateoutputstreambuf.h>
Inheritance diagram for zipios::DeflateOutputStreambuf
Public Methods | |
DeflateOutputStreambuf ( streambuf *outbuf, bool user_init = false, bool del_outbuf = false ) | |
DeflateOutputStreambuf constructor. More... | |
virtual | ~DeflateOutputStreambuf () |
Destructor. More... | |
bool | init ( int comp_level = 6 ) |
bool | closeStream () |
uint32 | getCrc32 () const |
Returns the CRC32 for the current stream. More... | |
uint32 | getCount () const |
Returns the number of bytes written to the streambuf, that has been processed from the input buffer by the compressor. More... | |
Protected Methods | |
virtual int | overflow ( int c = EOF ) |
virtual int | sync () |
bool | flushOutvec () |
Flushes _outvec and updates _zs.next_out and _zs.avail_out. More... | |
void | endDeflation () |
Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset(). More... | |
Protected Attributes | |
const int | _invecsize |
vector< char > | _invec |
const int | _outvecsize |
vector< char > | _outvec |
uint32 | _crc32 |
uint32 | _overflown_bytes |
Deflation/Inflation is a compression/decompression method used in gzip and zip. The zlib library is used to perform the actual deflation, this class only wraps the functionality in an output stream filter.
Definition at line 25 of file deflateoutputstreambuf.h.
|
DeflateOutputStreambuf constructor.
Definition at line 16 of file deflateoutputstreambuf.cpp. |
|
Destructor.
Definition at line 41 of file deflateoutputstreambuf.cpp. |
|
Definition at line 86 of file deflateoutputstreambuf.cpp. |
|
Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset().
Definition at line 171 of file deflateoutputstreambuf.cpp. |
|
Flushes _outvec and updates _zs.next_out and _zs.avail_out.
Definition at line 160 of file deflateoutputstreambuf.cpp. |
|
Returns the number of bytes written to the streambuf, that has been processed from the input buffer by the compressor. After closeStream() has been called this number is the total number of bytes written to the stream. Definition at line 55 of file deflateoutputstreambuf.h. |
|
Returns the CRC32 for the current stream. The returned value is the CRC for the data that has been compressed already (due to a call to overflow()). As DeflateOutputStreambuf may buffer an arbitrary amount of bytes until closeStream() has been invoked, the returned value is not very useful before closeStream() has been called. Definition at line 49 of file deflateoutputstreambuf.h. |
|
Definition at line 49 of file deflateoutputstreambuf.cpp. |
|
Definition at line 107 of file deflateoutputstreambuf.cpp. |
|
Definition at line 153 of file deflateoutputstreambuf.cpp. |
|
Definition at line 77 of file deflateoutputstreambuf.h. |
|
Definition at line 73 of file deflateoutputstreambuf.h. |
|
Definition at line 72 of file deflateoutputstreambuf.h. |
|
Definition at line 75 of file deflateoutputstreambuf.h. |
|
Definition at line 74 of file deflateoutputstreambuf.h. |
|
Definition at line 78 of file deflateoutputstreambuf.h. |