21 #ifndef ZYPP_CORE_BASE_GZSTREAM_H 22 #define ZYPP_CORE_BASE_GZSTREAM_H 29 #include <zypp-core/base/SimpleStreambuf> 30 #include <zypp-core/base/fXstream> 37 namespace gzstream_detail
104 {
return(
_mode == std::ios_base::in ); }
108 {
return(
_mode == std::ios_base::out ); }
111 canSeek ( std::ios_base::seekdir way_r )
const 112 {
return ( way_r == std::ios_base::beg || way_r == std::ios_base::cur ); }
115 bool openImpl(
const char * name_r, std::ios_base::openmode mode_r );
130 std::streamsize
readData (
char * buffer_r, std::streamsize maxcount_r );
131 bool writeData(
const char * buffer_r, std::streamsize count_r );
132 off_t
seekTo( off_t off_r, std::ios_base::seekdir way_r, std::ios_base::openmode omode_r );
146 std::ios_base::openmode
_mode = std::ios_base::openmode(0);
168 #endif // ZYPP_CORE_BASE_GZSTREAM_H bool writeData(const char *buffer_r, std::streamsize count_r)
detail::fXstream< std::istream, gzstream_detail::fgzstreambuf > ifgzstream
istream reading gzip files as well as plain files.
off_t compressed_tell() const
Tell the file position in the compressed file.
detail::fXstream< std::ostream, gzstream_detail::fgzstreambuf > ofgzstream
ostream writing gzip files.
String related utilities and Regular expression matching.
int _errno
errno, valid if zError is Z_ERRNO
error_type error() const
The last error returned fron zlib.
int _fd
file descriptor of the compressed file
std::ios_base::openmode _mode
Common template to define ifgzstream/ofgzstream reading/writing compressed files. ...
off_t seekTo(off_t off_r, std::ios_base::seekdir way_r, std::ios_base::openmode omode_r)
Streambuffer reading or writing gzip files.
std::streamsize readData(char *buffer_r, std::streamsize maxcount_r)
std::ostream & operator<<(std::ostream &str, const ZlibError &obj)
bool openImpl(const char *name_r, std::ios_base::openmode mode_r)
int _zError
The zlib error code.
std::string strerror() const
Return string describing the zlib error code.
Easy-to use interface to the ZYPP dependency resolver.
Helper class to ship zlib errors.
bool canSeek(std::ios_base::seekdir way_r) const