add compression and decompression