Computer scienceAlgorithms and data structuresAlgorithmsString coding algorithmsData compression

Huffman coding

Decompressing the Huffman code

Report a typo

The Huffman code book and the compressed binary data are given below. Decompress the code.

Symbol         frequency      Huffman Code
_              3              000
i              3              001
s              4              111
e              2              0111
f              2              1000
h              2              1001
m              2              1010
n              2              1011
o              2              1100
u              1              0100
t              1              01010
a              1              01011
c              1              01100
d              1              01101
p              1              11010
r              1              11011

Compressed data is:

0101010010011110000011110001001010010001000101001011101100001101011101100110010101101011011011111111100111001011

Enter a short text

Create a free account to access the full topic