Compress and decompress an array of bytes using Huffman coding