The format for running the gzip program is:
gzip option ...
gzip supports the following options:
compressed size: size of the compressed file uncompressed size: size of the uncompressed file ratio: compression ratio (0.0% if unknown) uncompressed_name: name of the uncompressed file
The uncompressed size is given as −1 for files not in gzip format, such as compressed ‘.Z’ files. To get the uncompressed size for such a file, you can use:
zcat file.Z | wc -c
In combination with the --verbose option, the following fields are also displayed:
method: compression method (deflate,compress,lzh,pack) crc: the 32-bit CRC of the uncompressed data date & time: time stamp for the uncompressed file
The CRC is given as ffffffff for a file not in gzip format.
With --verbose, the size totals and compression ratio for all files is also displayed, unless some sizes are unknown. With --quiet, the title and totals lines are not displayed.
The gzip format represents the input size modulo 2^32, so the uncompressed size and compression ratio are listed incorrectly for uncompressed files 4 GiB and larger. To work around this problem, you can use the following command to discover a large uncompressed file's true size:
zcat file.gz | wc -c
gunzip -S "" * (*.* for MSDOS)
Previous versions of gzip used the ‘.z’ suffix. This was changed to
avoid a conflict with pack.