Home▸Algorithms & AI▸Huffman Coding (2D)

🔣 Huffman Coding (2D)

2D Canvas view of Huffman coding: count character frequencies, step through the greedy min-heap tree build, read off prefix codes, and watch the compression ratio live.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-huffman ↗ Open standalone
⚙ Under the hood

Build a Huffman tree from any text you type: watch the greedy min-heap merge the two rarest characters step by step, read off each symbol's prefix code from the tree, and compare the compressed bit count to plain 8-bit encoding.

algorithmsdata-compressionhuffman-codingbinary-treegreedy-algorithm

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)