An n-ary Huffman algorithm implementation.