San Diego State University logo

*Technical Briefs*
ROHAN help Files

----------------------------------------------------------------------

gzip, gunzip, zcat

gzip uses the Lempel-Ziv algorithm used in zip and PKZIP. The amount of compression obtained depends on the size of the input and the distribution of common substrings. Typically, text such as source code or English is reduced by 60-70%. Compression is generally much better than that achieved by LZW (as used in compress), Huffman coding (as used in pack), or adaptive Huffman coding (compact). Each file is replaced by one with the extension .z If no files are specified, the standard input is compressed to the standard output.

Compression is always performed, even if the compressed file is slightly larger than the original. The worst case expansion is a few bytes for the gzip file header, plus 5 bytes every 32K block, or an expansion ratio of 0.015% for large files.

Compressed files can be restored to their original form, Syntax is:

rohan%  gzip -d  filename

where filename is the name of the compressed file. gunzip and zcat can replace gzip.

Note: the GNU compression programs (gzip, gunzip, zcat) give better compression rations and will uncompress files created by compress.

----------------------------------------------------------------------


BACK ROHAN Help Index | Academic Computing Handouts, Manuals, and Help Files

This page last modified: December 11, 2002
Send comments/suggestions about this web page to webmaster@rohan.sdsu.edu

SDSU Faculty and Students may send questions about software on ROHAN or ROHAN UNIX problems to problems@rohan.sdsu.edu