![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Public Types | |
| enum | FlushLevel { FLUSH_NONE, FLUSH_AVAILABLE, FLUSH_SYNC, FLUSH_RESTART } |
|
typedef std::function< size_t(const char *data, size_t len) | OnData ) |
Public Member Functions | |
| virtual size_t | compress (const char *data, size_t len, const OnData &onData)=0 |
| virtual size_t | flush (FlushLevel flushLevel, const OnData &onData)=0 |
| virtual size_t | finish (const OnData &onData)=0 |
Static Public Member Functions | |
| static std::string | filenameToCompression (const std::string &filename) |
| static Compressor * | create (const std::string &compression, int level) |
Public Attributes | |
| OnData | onData |
Definition at line 30 of file compressor.h.
Flush levels.
Definition at line 39 of file compressor.h.
| virtual size_t Datacratic::Compressor::compress | ( | const char * | data, |
| size_t | len, | ||
| const OnData & | onData | ||
| ) | [pure virtual] |
Compress the given data block, and write the result into the given buffer. Returns the number of output bytes written to consume the entire input buffer.
This will call onData zero or more times.
Implemented in Datacratic::LzmaCompressor, Datacratic::GzipCompressor, and Datacratic::NullCompressor.
| Compressor * Datacratic::Compressor::create | ( | const std::string & | compression, |
| int | level | ||
| ) | [static] |
Create a compressor with the given scheme.
Definition at line 53 of file compressor.cc.
| std::string Datacratic::Compressor::filenameToCompression | ( | const std::string & | filename | ) | [static] |
Convert a filename to a compression scheme.
Definition at line 40 of file compressor.cc.
| virtual size_t Datacratic::Compressor::finish | ( | const OnData & | onData | ) | [pure virtual] |
Finish the stream... no more data can be written to it afterwards, and everything will be put into the compression
Implemented in Datacratic::LzmaCompressor, Datacratic::GzipCompressor, and Datacratic::NullCompressor.
| virtual size_t Datacratic::Compressor::flush | ( | FlushLevel | flushLevel, |
| const OnData & | onData | ||
| ) | [pure virtual] |
Flush the stream at the given flush level. This will call onData zero or more times.
Implemented in Datacratic::LzmaCompressor, Datacratic::GzipCompressor, and Datacratic::NullCompressor.
1.7.6.1