class compress&decompress