implemented and tested the canonical huffman coding