![]() |
Project
|
Main class of the Huffman codec implementation. More...
#include <HuffmanCodec.h>
Public Types | |
using | model_type = _CodingModel |
using | value_type = typename model_type::value_type |
using | code_type = typename model_type::code_type |
Public Member Functions | |
HuffmanCodec ()=delete | |
HuffmanCodec (const model_type &model) | |
~HuffmanCodec ()=default | |
template<typename ValueType > | |
const bool | Encode (ValueType v, code_type &code, uint16_t &codeLength) const |
template<typename ReturnType > | |
bool | Decode (ReturnType &v, code_type code, uint16_t &codeLength) const |
model_type const & | getCodingModel () const |
Get the underlying coding model. | |
int | loadConfiguration (const char *filename, std::string method="zlib") |
int | writeConfiguration (const char *filename, std::string method="zlib") const |
Main class of the Huffman codec implementation.
The codec forwards the encoding/decoding requests to the implementation of the coding model.
TODO:
Definition at line 164 of file HuffmanCodec.h.
using o2::data_compression::HuffmanCodec< _CodingModel >::code_type = typename model_type::code_type |
Definition at line 169 of file HuffmanCodec.h.
using o2::data_compression::HuffmanCodec< _CodingModel >::model_type = _CodingModel |
Definition at line 167 of file HuffmanCodec.h.
using o2::data_compression::HuffmanCodec< _CodingModel >::value_type = typename model_type::value_type |
Definition at line 168 of file HuffmanCodec.h.
|
delete |
|
inline |
Definition at line 172 of file HuffmanCodec.h.
|
default |
|
inline |
Decode a value
v | [out] decoded value |
code | [in] code to be processed |
codeLength | [out] length of the processed code |
Definition at line 191 of file HuffmanCodec.h.
|
inline |
Encode a value and return Huffman code and code lenght
v | value to be encoded |
code | [out] returned code |
codeLength | [out] length of the returned code |
Definition at line 180 of file HuffmanCodec.h.
|
inline |
Get the underlying coding model.
Definition at line 198 of file HuffmanCodec.h.
|
inline |
Load configuration from file
Text file can be in compressed format, supported methods: gzip, zlib, bzip2, and lzma
Definition at line 206 of file HuffmanCodec.h.
|
inline |
Write configuration to file
Can be written in compressed format, supported methods: gzip, zlib, bzip2, and lzma
Definition at line 214 of file HuffmanCodec.h.