Protocols — Compression Algorithm Specification
Version 1.10 12/01/02 17-9
The Output() is the function that is responsible for generating Huffman codes and Blocks. It
accepts an Original Character or a Pointer as input and maintains a Block Buffer to temporarily
store data units that are to be Huffman coded. The following pseudo code describes the function:
FUNCTION NAME: Output
INPUT: an Original Character or a Pointer
Put the Original Character or the Pointer into the Block Buffer;
Advance the Block Buffer position pointer by 1;
IF the Block Buffer is full THEN
Encode the Char&Len Set in the Block buffer;
Encode the Position Set in the Block buffer;
Encode the Extra Set;
Output the Block Header containing the code length arrays;
Output the Block Body containing the Huffman encoded Original Characters and
Pointers;
Reset the Block Buffer position pointer to point to the beginning of the
Block buffer;
ENDIF
17.3.2 String Info Log
The provision of the String Info Log is to speed up the process of finding matching strings. The
design of this has significant impact on the overall performance of the compressor. This section
describes in detail how String Info Log is implemented and the typical operations on it.