#include <GzStream.h>
Inheritance diagram for zypp::gzstream_detail::fgzstreambuf:

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=std::ios_base::in) |
| fgzstreambuf * | close () |
| pos_type | compressed_tell () const |
| Tell the file position in the compressed file. | |
| ZlibError | zError () const |
| The last error returned fron zlib. | |
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 | |
| int | _fd |
| file descriptor of the compressed file | |
| 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.
Definition at line 81 of file GzStream.h.
|
|
Definition at line 146 of file GzStream.h. |
|
|
Definition at line 85 of file GzStream.h. |
|
|
Definition at line 93 of file GzStream.h. References close(). |
|
|
Definition at line 97 of file GzStream.h. References _file. |
|
|
Definition at line 101 of file GzStream.h. References _mode. Referenced by open(), and underflow(). |
|
|
Definition at line 105 of file GzStream.h. References _mode. Referenced by overflow(), and seekTo(). |
|
||||||||||||
|
Definition at line 74 of file GzStream.cc. References _buffer, _fd, _file, _mode, inReadMode(), isOpen(), and setZError(). |
|
|
Definition at line 120 of file GzStream.cc. References zypp::gzstream_detail::ZlibError::_errno, _error, _fd, _file, _mode, zypp::gzstream_detail::ZlibError::_zError, isOpen(), and sync(). Referenced by ~fgzstreambuf(). |
|
|
Tell the file position in the compressed file. Analogous to tell(2), complementary to gztell. Definition at line 352 of file GzStream.cc. References _fd. |
|
|
The last error returned fron zlib.
Definition at line 122 of file GzStream.h. References _error. |
|
|
Definition at line 156 of file GzStream.cc. References overflow(). |
|
|
Definition at line 173 of file GzStream.cc. References _buffer, inWriteMode(), and zWriteFrom(). Referenced by sync(). |
|
|
Definition at line 202 of file GzStream.cc. References _buffer, inReadMode(), and zReadTo(). |
|
||||||||||||||||
|
Definition at line 137 of file GzStream.h. References seekTo(). |
|
||||||||||||
|
Definition at line 141 of file GzStream.h. References seekTo(). |
|
|
Definition at line 162 of file GzStream.h. References _error, _file, and zypp::gzstream_detail::ZlibError::_zError. Referenced by open(), zReadTo(), zSeekTo(), zTell(), and zWriteFrom(). |
|
||||||||||||
|
Definition at line 232 of file GzStream.cc. References _file, zypp::base::sysconfig::read(), and setZError(). Referenced by underflow(). |
|
||||||||||||
|
Definition at line 246 of file GzStream.cc. References _file, and setZError(). Referenced by overflow(). |
|
||||||||||||
|
Definition at line 263 of file GzStream.cc. References _file, and setZError(). Referenced by seekTo(). |
|
|
Definition at line 277 of file GzStream.cc. References _file, and setZError(). Referenced by seekTo(). |
|
||||||||||||
|
Definition at line 291 of file GzStream.cc. References _buffer, inWriteMode(), isOpen(), sync(), zSeekTo(), and zTell(). |
|
|
file descriptor of the compressed file
Definition at line 149 of file GzStream.h. Referenced by close(), compressed_tell(), and open(). |
|
|
Definition at line 151 of file GzStream.h. Referenced by close(), isOpen(), open(), setZError(), zReadTo(), zSeekTo(), zTell(), and zWriteFrom(). |
|
|
Definition at line 153 of file GzStream.h. Referenced by close(), inReadMode(), inWriteMode(), and open(). |
|
|
Definition at line 155 of file GzStream.h. Referenced by open(), overflow(), seekTo(), and underflow(). |
|
|
Definition at line 157 of file GzStream.h. Referenced by close(), setZError(), and zError(). |
1.4.6