| Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
#include <huffmannodes.hpp>
Inheritance diagram for HuffNode_Leaf:

Each node holds a bitvector representing its bitcode for output/input, which is calculated by traversing the final huffman tree. We store it explicitly for fast access during coding. A node also contains the symbol id# that it corresponds to in the parser.
Definition at line 183 of file huffmannodes.hpp.
Public Member Functions | |
| HuffNode_Leaf (int insymbolid, THuffmanNodeWeight inweight) | |
| constructor | |
| virtual | ~HuffNode_Leaf () |
| destructor | |
| void | recursive_freechildren () |
| freeing memory occupied by this node and any children | |
| virtual void | traverse_buildbitcodes (std::bitset< DEF_HUFFMANPQ_MAXFUNCBITS > ¤t_bitset, int bitsetlength) |
| recursive traversal of huffman tree for building bitcodes | |
| int | get_symbolid () |
| get the symbol id# corresponding to this symbol | |
| void | set_symbolid (int val) |
| set the symbol id# | |
| unsigned char | get_bitcode_length () |
| get length of bitcode | |
| std::string | get_bitcode_string () |
| get a string representation of the bitcode (useful for debugging) | |
| virtual unsigned int | get_memoryused () const |
| space used by the node | |
| virtual bool | isleaf () |
| is this a leaf node (this is an RTTI type function) | |
| virtual bool | AddBitsToBitWriter (bitwriter &bw) |
| add the bits from this leaf symbol to the output bitwriter, will depend on derived class | |
Protected Attributes | |
| unsigned char | code_bitsetlength |
| std::bitset< DEF_HUFFMANPQ_MAXIMUM_CODEBITDEPTH > | code_bitset |
| the bits used to code this symbol in the huffman tree | |
| int | symbolid |
| the parser symbol id# that this node refers to | |
|
|
space used by the node
Reimplemented from HuffNode. Definition at line 212 of file huffmannodes.hpp. References code_bitset.
00212 {return (unsigned int)(sizeof(this)+sizeof(code_bitset));}
|