Compress files at maximum compression
# gzip -9 File name
When compressing a file and spitting it out to another location
# cat error_log | gzip -9 >> /tmp/error_log.gz
If you just want to see the contents of the compressed file
#zcat compressed file name
If you want to check a normal file with less, zless
#zless compressed file name
You can use zgrep when you want to find a part of a compressed file that contains a specific string.
#zgrep string compressed file name This is also the same result #zcat compressed file name|grep string
You can check the contents of the tar + gzip compressed (tar zcpvf xxx.tgz aaa bbb) file with less.