Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

TNL::HuffmanStringProcessor Namespace Reference

HuffmanStringProcessor does Huffman coding on strings written into BitStream objects. More...


Functions

bool readHuffBuffer (BitStream *pStream, char *out_pBuffer)
 Reads a Huffman compressed string out of a BitStream.

bool writeHuffBuffer (BitStream *pStream, const char *out_pBuffer, U32 maxLen)
 Writes and Huffman compresses a string into a BitStream.


Detailed Description

HuffmanStringProcessor does Huffman coding on strings written into BitStream objects.

Function Documentation

bool TNL::HuffmanStringProcessor::writeHuffBuffer BitStream   pStream,
const char *    out_pBuffer,
U32    maxLen
 

Writes and Huffman compresses a string into a BitStream.

Parameters:
pStream  Stream to output compressed data to.
out_pBuffer  String to compress.
maxLen  Maximum length of the string. If string length exceeds this, then the string is terminated early.
Note:
The Huffman encoder uses BitStream::writeString as a fallback. WriteString can only write strings of up to 255 characters length. Therefore, it is wise not to exceed that limit.

Definition at line 228 of file huffmanStringProcessor.cpp.

References TNL::U32, TNL::BitStream::write(), TNL::BitStream::writeBits(), TNL::BitStream::writeFlag(), and TNL::BitStream::writeInt().


Generated on Thu Aug 18 16:03:39 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18