Try:
Character Frequencies
Higher-frequency characters get shorter binary codes in the Huffman tree.
Step-by-Step Tree Construction
The algorithm repeatedly merges the two lowest-frequency nodes until one tree remains.
—
Priority Queue State
Tree Progress — dimmed nodes are not yet built
Existing
Being merged
Newly created
Not yet built
Compression Statistics
Huffman Codes
Sorted shortest first. Shorter code = higher frequency.
Encoded Output
Decoded (Verification)
Final Huffman Tree
Scroll to zoom · Drag to pan
Run-Length Encoding
RLE replaces consecutive runs of the same character with a count + character pair (e.g., "AAABBB" → "3A3B"). It excels with repetitive data but can expand input with no repeated characters.
Run Visualization
Each block is one run of identical characters. The encoded token appears at the bottom of each block.
RLE Encoded Output
Algorithm Comparison
Same input, different strategies. The winning algorithm depends on the structure of the data.
| Algorithm | Size (bits) | Space Saved | Avg bits/char | Notes |
|---|