
Decoding
For decoding the Huffman tree is passed through with the encoded data step by step. Whenever a node not having a successor is reached, the assigned symbol will be written to the decoded data.
01011101101011000101110
encoded decoded
0 a
10 b
111 r
0 a
1101 c
0 a
1100 d
0 a
10 b
111 r
0 a
Huffman Code Tree:

< ^ >
|