#include <gzstream.h>
Public Member Functions | |
fgzstreambuf (unsigned bufferSize_r=512) | |
virtual | ~fgzstreambuf () |
bool | isOpen () const |
bool | inReadMode () const |
bool | inWriteMode () const |
fgzstreambuf * | open (const char *name_r, std::ios_base::openmode mode_r) |
fgzstreambuf * | close () |
ZlibError | zError () const |
Protected Member Functions | |
virtual int | sync () |
virtual int_type | overflow (int_type c=traits_type::eof()) |
virtual int_type | underflow () |
virtual pos_type | seekoff (off_type off_r, std::ios_base::seekdir way_r, std::ios_base::openmode) |
virtual pos_type | seekpos (pos_type pos_r, std::ios_base::openmode) |
Private Types | |
typedef std::vector< char > | buffer_type |
Private Member Functions | |
void | setZError () |
std::streamsize | zReadTo (char *buffer_r, std::streamsize maxcount_r) |
bool | zWriteFrom (const char *buffer_r, std::streamsize count_r) |
pos_type | zSeekTo (off_type off_r, std::ios_base::seekdir way_r) |
pos_type | zTell () |
pos_type | seekTo (off_type off_r, std::ios_base::seekdir way_r) |
Private Attributes | |
gzFile | _file |
std::ios_base::openmode | _mode |
buffer_type | _buffer |
ZlibError | _error |
Read and write mode are mutual exclusive. Seek is supported, but zlib restrictions appy (only forward seek in write mode; backward seek in read mode might be expensive).Putback is not supported.
Reading plain (no gziped) files is possible as well.
This streambuf is used in ifgzstream and ofgzstream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The last error returned retuned fron zlib. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|