This generates special cases of the huffman encoding tree using 8 bit keys with the additional condition that unused combinations of 8 bits are treated as a frequency of 1.
#include <DS_HuffmanEncodingTree.h>
List of all members.
Classes |
| struct | CharacterEncoding |
| | Used to hold bit encoding for one character. More...
|
Public Member Functions |
| unsigned | DecodeArray (RakNet::BitStream *input, BitSize_t sizeInBits, size_t maxCharsToWrite, unsigned char *output) |
| void | DecodeArray (unsigned char *input, BitSize_t sizeInBits, RakNet::BitStream *output) |
| void | EncodeArray (unsigned char *input, size_t sizeInBytes, RakNet::BitStream *output) |
| | Pass an array of bytes to array and a preallocated BitStream to receive the output.
|
| void | FreeMemory (void) |
| | Free the memory used by the tree.
|
| void | GenerateFromFrequencyTable (unsigned int frequencyTable[256]) |
| | Given a frequency table of 256 elements, all with a frequency of 1 or more, generate the tree.
|
| | HuffmanEncodingTree () |
| | ~HuffmanEncodingTree () |
Private Member Functions |
| void | InsertNodeIntoSortedList (HuffmanEncodingTreeNode *node, DataStructures::LinkedList< HuffmanEncodingTreeNode * > *huffmanEncodingTreeNodeList) const |
Private Attributes |
| CharacterEncoding | encodingTable [256] |
| HuffmanEncodingTreeNode * | root |
| | The root node of the tree.
|
Detailed Description
Definition at line 22 of file DS_HuffmanEncodingTree.h.
Constructor & Destructor Documentation
| RakNet::HuffmanEncodingTree::HuffmanEncodingTree |
( |
| ) |
|
| RakNet::HuffmanEncodingTree::~HuffmanEncodingTree |
( |
| ) |
|
Member Function Documentation
| unsigned RakNet::HuffmanEncodingTree::DecodeArray |
( |
RakNet::BitStream * |
input, |
|
|
BitSize_t |
sizeInBits, |
|
|
size_t |
maxCharsToWrite, |
|
|
unsigned char * |
output |
|
) |
| |
| void RakNet::HuffmanEncodingTree::EncodeArray |
( |
unsigned char * |
input, |
|
|
size_t |
sizeInBytes, |
|
|
RakNet::BitStream * |
output |
|
) |
| |
- Parameters:
-
| [in] | input | Array of bytes to encode |
| [in] | sizeInBytes | size of input |
| [out] | output | The bitstream to write to |
| void RakNet::HuffmanEncodingTree::FreeMemory |
( |
void |
| ) |
|
| void RakNet::HuffmanEncodingTree::GenerateFromFrequencyTable |
( |
unsigned int |
frequencyTable[256] | ) |
|
Member Data Documentation
The documentation for this class was generated from the following file: