Small basic huffman implementation