#include <HuffmanEncodingTree.h>
Public Member Functions | |
HuffmanEncodingTree () | |
~HuffmanEncodingTree () | |
void | EncodeArray (unsigned char *input, int sizeInBytes, RakNet::BitStream *output) |
int | DecodeArray (RakNet::BitStream *input, int sizeInBits, int maxCharsToWrite, unsigned char *output) |
void | DecodeArray (unsigned char *input, int sizeInBits, RakNet::BitStream *output) |
void | GenerateFromFrequencyTable (unsigned long frequencyTable[256]) |
void | FreeMemory (void) |
Private Member Functions | |
void | InsertNodeIntoSortedList (HuffmanEncodingTreeNode *node, BasicDataStructures::LinkedList< HuffmanEncodingTreeNode * > *huffmanEncodingTreeNodeList) const |
Private Attributes | |
HuffmanEncodingTreeNode * | root |
CharacterEncoding | encodingTable [256] |
Classes | |
struct | CharacterEncoding |
|
|
|
|
|
|
|
Two versions that perform the same operation. The second version also the number of bytes in the stream, which may be greater than the max chars to write |
|
Pass an array of bytes to array and a preallocated BitStream to receive the output |
|
Free the memory used by the tree |
|
Given a frequency table of 256 elements, all with a frequency of 1 or more, generate the tree |
|
|
|
|
|
The root node of the tree |