Text compression algorithm based on Huffman coding