compress/uncompress

When a file is too big, it can be compressed, meaning it can be transformed into a binary file of smaller size1 which contains the same information.

To get the original file back, it must be uncompressed.

compress and uncompress are two original UNIX commands for compression and uncompression, respectively.

The compressed file name ends with a .Z extension.

cat f1
cp f1 f2
ls -l
compress f1
ls -l
uncompress f1.Z
ls -l
cmp f1 f2

  1. the reduction of the file size is not guaranteed