To compress the file
$ compress demo.txt
demo.txt.Z
To uncompress the file
$ uncompress demo.txt.Z
To write to the standard output
$ uncompress -c demo.txt.Z
To print verbose output
$ uncompress -v demo.txt.Z
To uncompress forcefully
$ uncompress -f demo.txt.Z
$ uncompress -cvf demo.txt.Z
combining with tar command
$ tar -cvf - dir1 dir2 | compress > file.tar.Z
To uncompress
$ uncompress -c file.tar.Z|tar -xvf -
regards,
T.Dhanasekar