InflateInputStreambuf is an input stream filter, that inflates the input from the attached input stream. More...
#include <inflateinputstreambuf.h>
Public Member Functions | |
InflateInputStreambuf (streambuf *inbuf, int s_pos=-1, bool del_inbuf=false) | |
InflateInputStreambuf constructor. | |
bool | reset (int stream_position=-1) |
Resets the zlib stream and purges input and output buffers. | |
virtual | ~InflateInputStreambuf () |
Protected Member Functions | |
virtual int | underflow () |
Protected Attributes | |
vector< char > | _outvec |
const int | _outvecsize |
InflateInputStreambuf is an input stream filter, that inflates the input from the attached input stream.
Deflation/Inflation is a compression/decompression method used in gzip and zip. The zlib library is used to perform the actual inflation, this class only wraps the functionality in an input stream filter.
Definition at line 22 of file inflateinputstreambuf.h.
zipios::InflateInputStreambuf::InflateInputStreambuf | ( | streambuf * | inbuf, | |
int | s_pos = -1 , |
|||
bool | del_inbuf = false | |||
) | [explicit] |
InflateInputStreambuf constructor.
inbuf | the streambuf to use for input. | |
s_pos | a position to reset the inbuf to before reading. Specify -1 to read from the current position. | |
del_inbuf | if true is specified inbuf will be deleted, when the InflateInputStreambuf is destructed. |
Definition at line 18 of file inflateinputstreambuf.cpp.
References reset().
zipios::InflateInputStreambuf::~InflateInputStreambuf | ( | ) | [virtual] |
Definition at line 43 of file inflateinputstreambuf.cpp.
bool zipios::InflateInputStreambuf::reset | ( | int | stream_position = -1 |
) |
Resets the zlib stream and purges input and output buffers.
repositions the input streambuf at stream_position.
stream_position | a position to reset the inbuf to before reading. Specify -1 to read from the current position. |
Definition at line 117 of file inflateinputstreambuf.cpp.
References zipios::FilterInputStreambuf::_inbuf, _outvec, and _outvecsize.
Referenced by zipios::ZipInputStreambuf::getNextEntry(), and InflateInputStreambuf().
int zipios::InflateInputStreambuf::underflow | ( | ) | [protected, virtual] |
Reimplemented in zipios::ZipInputStreambuf.
Definition at line 56 of file inflateinputstreambuf.cpp.
References zipios::FilterInputStreambuf::_inbuf, _outvec, _outvecsize, and zipios::OutputStringStream::str().
Referenced by zipios::ZipInputStreambuf::underflow().
vector< char > zipios::InflateInputStreambuf::_outvec [protected] |
Definition at line 49 of file inflateinputstreambuf.h.
Referenced by zipios::ZipInputStreambuf::getNextEntry(), reset(), zipios::ZipInputStreambuf::underflow(), and underflow().
const int zipios::InflateInputStreambuf::_outvecsize [protected] |
Definition at line 48 of file inflateinputstreambuf.h.
Referenced by zipios::ZipInputStreambuf::getNextEntry(), reset(), zipios::ZipInputStreambuf::underflow(), and underflow().