#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.
typedef std::vector<char> fgzstreambuf::buffer_type [private] |
| fgzstreambuf::fgzstreambuf | ( | unsigned | bufferSize_r = 512 |
) | [inline] |
| virtual fgzstreambuf::~fgzstreambuf | ( | ) | [inline, virtual] |
| bool fgzstreambuf::isOpen | ( | ) | const [inline] |
| bool fgzstreambuf::inReadMode | ( | ) | const [inline] |
| bool fgzstreambuf::inWriteMode | ( | ) | const [inline] |
| fgzstreambuf* fgzstreambuf::open | ( | const char * | name_r, | |
| std::ios_base::openmode | mode_r | |||
| ) |
| fgzstreambuf* fgzstreambuf::close | ( | ) |
| ZlibError fgzstreambuf::zError | ( | ) | const [inline] |
The last error returned retuned fron zlib.
| virtual int fgzstreambuf::sync | ( | ) | [protected, virtual] |
| virtual int_type fgzstreambuf::overflow | ( | int_type | c = traits_type::eof() |
) | [protected, virtual] |
| virtual int_type fgzstreambuf::underflow | ( | ) | [protected, virtual] |
| virtual pos_type fgzstreambuf::seekoff | ( | off_type | off_r, | |
| std::ios_base::seekdir | way_r, | |||
| std::ios_base::openmode | ||||
| ) | [inline, protected, virtual] |
| virtual pos_type fgzstreambuf::seekpos | ( | pos_type | pos_r, | |
| std::ios_base::openmode | ||||
| ) | [inline, protected, virtual] |
| void fgzstreambuf::setZError | ( | ) | [inline, private] |
| std::streamsize fgzstreambuf::zReadTo | ( | char * | buffer_r, | |
| std::streamsize | maxcount_r | |||
| ) | [private] |
| bool fgzstreambuf::zWriteFrom | ( | const char * | buffer_r, | |
| std::streamsize | count_r | |||
| ) | [private] |
| pos_type fgzstreambuf::zSeekTo | ( | off_type | off_r, | |
| std::ios_base::seekdir | way_r | |||
| ) | [private] |
| pos_type fgzstreambuf::zTell | ( | ) | [private] |
| pos_type fgzstreambuf::seekTo | ( | off_type | off_r, | |
| std::ios_base::seekdir | way_r | |||
| ) | [private] |
gzFile fgzstreambuf::_file [private] |
std::ios_base::openmode fgzstreambuf::_mode [private] |
buffer_type fgzstreambuf::_buffer [private] |
ZlibError fgzstreambuf::_error [private] |
1.5.3