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