← Back to Gallery

Huffman Coding

About Huffman Coding

Huffman coding creates optimal prefix-free variable-length codes. More frequent symbols get shorter codes, minimizing average code length.

The algorithm builds a binary tree by repeatedly combining the two least frequent nodes until only the root remains.