add compress & decompress function