Huffman coding (source code)

= Huffman coding
{c}
{wiki}

Huffman's algorithm repeatedly combines the $D$ least weights for a $D$-ary prefix code and yields an optimal expected length.