For anyone wanting to try this at home, the contraption uses a Huffman binary code.
To make the code a canonical Huffman code, the codes are renumbered.
Huffman threaded code consists of lists of Huffman codes.
A Huffman code is a variable length bit string used to identify a unique item.
To reduce the size of a file by a complicated scheme that produces bit configurations completely unrelated to the original data, such as by a Huffman code.
Universal codes are also useful when Huffman codes are inconvenient.
Parallels with Huffman codes and probabilistic binary search trees are drawn.
A method was later found to design a Huffman code in linear time if input probabilities (also known as weights) are sorted.
Note that, in general, a Huffman code need not be unique, but it is always one of the codes minimizing .
The resulting raw data is compressed using a modified Huffman code optimized for written text, achieving average compression factors of around 20.