Write Huffman table optimizer