Text compression using huffman code in python.