Huffman coding with heap priority queues