clockUtils  1.1
clockUtils::compression::algorithm::HuffmanFixed Class Reference

class for Huffman compression using a fixed dictionary has no header like HuffmanGeneric, but can't optimize as good as HuffmanGeneric More...

#include <HuffmanFixed.h>

Inheritance diagram for clockUtils::compression::algorithm::HuffmanFixed:
Inheritance graph

Static Public Member Functions

static ClockError compress (const std::string &uncompressed, std::string &compressed)
 compresses the given string and returns result More...
 
static ClockError decompress (const std::string &compressed, std::string &decompressed)
 decompresses the given string and returns result More...
 

Additional Inherited Members

- Protected Types inherited from clockUtils::compression::algorithm::HuffmanBase
typedef uint32_t len_t
 type that should be used as the 'length' counter This controls the size of the header, the maximum string length etc. More...
 
- Static Protected Member Functions inherited from clockUtils::compression::algorithm::HuffmanBase
static std::shared_ptr< NodebuildTree (const std::vector< uint8_t > &header)
 creates a Huffman tree with given list of probabilities header must have size 256 and values have to be between 0 and 255 (unsigned char) if a value is zero no node is inserted into the tree and this value isn't accessible More...
 
static void generateMapping (const std::shared_ptr< Node > &node, const std::vector< bool > &bitSeq, std::vector< std::vector< bool >> &mapping)
 constructs a mapping from character to a bit sequence More...
 
static ClockError getChar (const std::string &compressed, const std::shared_ptr< Node > &root, len_t length, std::string &result)
 converts bit sequence to the real character More...
 

Detailed Description

class for Huffman compression using a fixed dictionary has no header like HuffmanGeneric, but can't optimize as good as HuffmanGeneric

Definition at line 38 of file HuffmanFixed.h.

Member Function Documentation

§ compress()

static ClockError clockUtils::compression::algorithm::HuffmanFixed::compress ( const std::string &  uncompressed,
std::string &  compressed 
)
static

compresses the given string and returns result

§ decompress()

static ClockError clockUtils::compression::algorithm::HuffmanFixed::decompress ( const std::string &  compressed,
std::string &  decompressed 
)
static

decompresses the given string and returns result


The documentation for this class was generated from the following file: