|A small portion of a Huffman tree|
|Proper counting is crucial|
On the second image you can recognize "DIZAINES" and "UNITÉS". The letters are hardly visible after some 90 years of use... It's a pool table in the mythic Schlauch Restaurant in Zurich.
There is an equally beautiful implementation , translated for the purpose of the Zip-Ada project - a proper dynamic Deflate for compression is still missing, and a limited-length Huffman tree building algorithm is needed for that.
Translation is there: specification, body, test procedure, and abstract enough to build with an Ada 83 compiler (at least GNAT in -gnat83 mode)!
 Search: "A Fast and Space-Economical Algorithm for Length-Limited Coding"
 Search: "katajainen.c" (this part of the "Zopfli" project)