Huffman Coding — 2D

Symbols—
Total characters—
Original bits (8/sym)—
Compressed bits—
Compression ratio—
Avg code length—
Press "Build tree" to count frequencies and start merging.
Greedy min-heap: each step pops the two lowest-frequency nodes and merges them into a parent, until one root remains. Left edge = 0, right edge = 1.