Encoding and decoding using Huffman lossless data compression algorithm