RakNet  4.0
Public Member Functions | List of all members
RakNet::HuffmanEncodingTree Class Reference

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. More...

#include <DS_HuffmanEncodingTree.h>

Public Member Functions

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 GenerateFromFrequencyTable (unsigned int frequencyTable[256])
 Given a frequency table of 256 elements, all with a frequency of 1 or more, generate the tree.
 
void FreeMemory (void)
 Free the memory used by the tree.
 

Detailed Description

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.

Member Function Documentation

void RakNet::HuffmanEncodingTree::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.

Parameters
[in]inputArray of bytes to encode
[in]sizeInBytessize of input
[out]outputThe bitstream to write to

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