Compress and decompress working correctly