Lossless Compression

Let's dive deep into the history of Huffman Codings and how we can use them in combination with Ukkonen's Algorithm and Elias Omega Coding to minimise the data we send over-the-wire.

History

I recall laughing when I found out that David A. Huffman created Huffman Codings after his professor, Robert M. Fano, offered his MIT class two options:

  1. Take a final exam.
  2. Prove that an existing binary code was as efficient as possible, or come up with a better one.

Instead of just studying for the exam like most normal students, Huffman tried to prove that an existing algorithm was already as efficient as possible, without any luck. So he switched gears and tried to find something better.

What he discovered was that it was more efficient to go bottom-up when creating the tree for an encoding, rather than top-down, and thus Huffman Codings were born. Source

Terminology

Coming soon…

The O.G. Fano Approach

Coming soon…

The Chad Huffman Approach

Coming soon…

Sprinkle in Elias Omega

Coming soon…

Just a touch of Ukkonnen’s

Coming soon…

Decoding

Coming soon…

Implementation

I’m a firm believer that pseudocode will be far more helpful to anyone reading this than plain Python code that can be copy-pasted.

Coming soon…