Short answer: Huffman coding builds a prefix-free binary code by repeatedly merging the two lowest-frequency symbols, or trees, into a parent whose frequency is their sum. One child edge is bit 0 and the other is bit 1. The code for a symbol is the path from the root.…
