Compression and Decompression Algorithm