|
LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
|
gzip filtering stream buffer class. More...
#include <gzfilterstream.h>


Public Types | |
| enum | CompressionLevel { DEFAULT_COMPRESSION = 6 , NO_COMPRESSION = 0 , BEST_SPEED = 1 , BEST_COMPRESSION = 9 } |
| typical compression level enumeration More... | |
| enum | FlushType { NO_FLUSH = 0 , PARTIAL_FLUSH = 1 , SYNC_FLUSH = 2 , FULL_FLUSH = 3 , FINISH = 4 } |
| flush type enumeration. | |
Public Member Functions | |
| gzfilterstreambuf (std::streambuf &strm, int level=DEFAULT_COMPRESSION, std::size_t buf_size=8192) | |
| constructor with another stream buffer More... | |
| ~gzfilterstreambuf () | |
| destructor More... | |
| bool | setLevel (const int level) |
| change complession level More... | |
Protected Member Functions | |
| bool | writeData (int flush_type=NO_FLUSH) |
| write data to buffer and/or destination More... | |
| int | readData (char *dest, int &dest_size) |
| read data from destination. More... | |
| virtual int_type | overflow (int_type c) |
| flush current internal buffer. More... | |
| virtual int | sync () |
| syncronize data to output devide More... | |
| virtual int_type | underflow () |
| read data from input device More... | |
gzip filtering stream buffer class.
typical compression level enumeration
The list of compresion level defined in zlib.h
|
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 unique_ptr. This buffer is deleted automatically.
| rcsc::gzfilterstreambuf::~gzfilterstreambuf | ( | ) |
destructor
Destructor flushes buffered data and releases all allocated buffers.
|
protectedvirtual |
flush current internal buffer.
this method is overrided method and called from close(), sync() and overflow().
|
protected |
read data from destination.
| dest | buffer to record the data. |
| dest_size | reference to the buffer size variable |
| bool rcsc::gzfilterstreambuf::setLevel | ( | const int | level | ) |
change complession level
| level | new compression level(0-9) |
Compression strategy is set to Z_DEFAULT_STRATEGY automatically.
|
protectedvirtual |
syncronize data to output devide
this method is overrided method
|
protectedvirtual |
read data from input device
this method is overrided method and supposed to read some bytes from the input device to internal buffer.
|
protected |
write data to buffer and/or destination
| flush_type | zlib flush type parameter. see deflate in zlib.h. |