Go to the documentation of this file.
21 #ifndef ZYPP_BASE_GZSTREAM_H
22 #define ZYPP_BASE_GZSTREAM_H
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_BASE_GZSTREAM_H
int _zError
The zlib error code.
std::ostream & operator<<(std::ostream &str, const ZlibError &obj)
Stream output.
detail::fXstream< std::istream, gzstream_detail::fgzstreambuf > ifgzstream
istream reading gzip files as well as plain files.
Streambuffer reading or writing gzip files.
bool canSeek(std::ios_base::seekdir way_r) const
int _fd
file descriptor of the compressed file
int _errno
errno, valid if zError is Z_ERRNO
Easy-to use interface to the ZYPP dependency resolver.
off_t compressed_tell() const
Tell the file position in the compressed file.
std::ios_base::openmode _mode
error_type error() const
The last error returned fron zlib.
bool writeData(const char *buffer_r, std::streamsize count_r)
bool openImpl(const char *name_r, std::ios_base::openmode mode_r)
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)
std::streamsize readData(char *buffer_r, std::streamsize maxcount_r)
Helper class to ship zlib errors.
String related utilities and Regular expression matching.
std::string strerror() const
Return string describing the zlib error code.
detail::fXstream< std::ostream, gzstream_detail::fgzstreambuf > ofgzstream
ostream writing gzip files.