compressing and decompressing