Source text
Everything below rebuilds as you type.
54 / 500
Load a sample
Short
Prose
Playful
Builds upward: repeatedly merges the two least probable nodes until one root is left.
- Space saved
- 48.8%vs 8-bit
- Fixed width
- 432bits
- Huffman
- 221bits
- Distinct symbols
- 20leaves
- Average code
- 4.093bits/symbol
- Entropy
- 4.060bits/symbol
Huffman tree
Three-dimensional Huffman tree with 20 leaves. Focus this view and use the arrow keys to orbit, plus and minus to zoom.
0left branch1right branchDepth 6 · 39 nodes
Codebook
| Symbol | Count | Share | Code | Bits |
|---|---|---|---|---|
| ␣space | 7 | 100 | 3 | |
| nn | 5 | 1111 | 4 | |
| oo | 5 | 000 | 3 | |
| ss | 5 | 001 | 3 | |
| tt | 4 | 1010 | 4 | |
| ee | 3 | 0100 | 4 | |
| ff | 3 | 0101 | 4 | |
| rr | 3 | 0110 | 4 | |
| uu | 3 | 0111 | 4 | |
| cc | 2 | 10110 | 5 | |
| dd | 2 | 10111 | 5 | |
| hh | 2 | 11000 | 5 | |
| ii | 2 | 11001 | 5 | |
| mm | 2 | 11010 | 5 | |
| aa | 1 | 110110 | 6 | |
| bb | 1 | 110111 | 6 | |
| gg | 1 | 111000 | 6 | |
| ll | 1 | 111001 | 6 | |
| 1 | 111010 | 6 | ||
| yy | 1 | 111011 | 6 |
Encoded bitstream
11000011101010101110101101101111100101100001011111001111111100010010100111011011110011000101011001001110100111010011111010100001111011110101101110001110010011001100111111010000100001110000000110101010010110000101110100001
221 bits·211 saved against 432 at 8 bits per character