クラス rcsc::gzfilterstreambuf

gzip filtering stream buffer class. [詳細]

#include <gzfilterstream.h>

すべてのメンバ一覧

Public 型

enum  CompressionLevel {
  DEFAULT_COMPRESSION = 6, NO_COMPRESSION = 0, BEST_SPEED = 1, BEST_COMPRESSION = 9,
  DEFAULT_COMPRESSION = -1, NO_COMPRESSION = 0, BEST_SPEED = 1, BEST_COMPRESSION = 9
}
 typical compression level enumeration [詳細]
enum  FlushType {
  NO_FLUSH = 0, PARTIAL_FLUSH = 1, SYNC_FLUSH = 2, FULL_FLUSH = 3,
  FINISH = 4
}
 flush type enumeration.

Public メソッド

 gzfilterstreambuf (std::streambuf &strm, int level=DEFAULT_COMPRESSION, std::size_t buf_size=8192)
 constructor with another stream buffer
 ~gzfilterstreambuf ()
 destructor
bool setLevel (const int level)
 change complession level

Protected メソッド

bool writeData (int flush_type=NO_FLUSH)
 write data to buffer and/or destination
int readData (char *dest, int &dest_size)
 read data from destination.
virtual int_type overflow (int_type c)
 flush current internal buffer.
virtual int sync ()
 syncronize data to output devide
virtual int_type underflow ()
 read data from input device


説明

gzip filtering stream buffer class.


列挙型

enum rcsc::gzfilterstreambuf::CompressionLevel

typical compression level enumeration

The list of compresion level defined in zlib.h


コンストラクタとデストラクタ

rcsc::gzfilterstreambuf::gzfilterstreambuf ( std::streambuf &  strm,
int  level = DEFAULT_COMPRESSION,
std::size_t  buf_size = 8192 
) [explicit]

constructor with another stream buffer

引数:
strm filtered stream buffer.
level gzip compression level
buf_size allocated buffer size (default: 8192)
Default constructor creates an internal file buffer using boost::scoped_ptr. This buffer is deleted automatically.

rcsc::gzfilterstreambuf::~gzfilterstreambuf (  ) 

destructor

Destructor flushes buffered data and releases all allocated buffers.


関数

bool rcsc::gzfilterstreambuf::setLevel ( const int  level  ) 

change complession level

引数:
level new compression level(0-9)
戻り値:
true if level is validated value, else false.
Compression strategy is set to Z_DEFAULT_STRATEGY automatically.

bool rcsc::gzfilterstreambuf::writeData ( int  flush_type = NO_FLUSH  )  [protected]

write data to buffer and/or destination

引数:
flush_type zlib flush type parameter. see deflate in zlib.h.
戻り値:
true if successfully written, else false.

int rcsc::gzfilterstreambuf::readData ( char *  dest,
int &  dest_size 
) [protected]

read data from destination.

引数:
dest buffer to record the data.
dest_size reference to the buffer size variable
戻り値:
size of the read data

gzfilterstreambuf::int_type rcsc::gzfilterstreambuf::overflow ( int_type  c  )  [protected, virtual]

flush current internal buffer.

this method is overrided method and called from close(), sync() and overflow().

int rcsc::gzfilterstreambuf::sync (  )  [protected, virtual]

syncronize data to output devide

this method is overrided method

gzfilterstreambuf::int_type rcsc::gzfilterstreambuf::underflow (  )  [protected, virtual]

read data from input device

this method is overrided method and supposed to read some bytes from the input device to internal buffer.


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0