Huffman Coding
Visualize character frequencies, tree building, and prefix-free encoding.
Free theory articleVisualize character frequencies, tree building, and prefix-free encoding.
Concept & interpretation
Huffman coding is a lossless data compression algorithm that uses variable-length codes to represent symbols. The core idea is to assign shorter codes to more frequent symbols and longer codes to less frequent ones, which minimizes the total length of the encoded data. It uses a greedy approach to build an optimal prefix-free tree from the bottom up.