An implemention of huffman code