COHERENT manpages

This page displays the COHERENT manpage for compression [Programs used to compress text].

List of available manpages
Index


compression -- Technical Information

Programs used to compress text

Compression is the technique  whereby a file is analyzed mathematically and
made smaller.  Compress is very useful in reducing the amount of disk space
taken up by large files that you use infrequently.

The amount of compression will vary,  depending upon the type of file being
compressed, the  compression algorithm used,  and the level  of compression
requested.   In  general,  files  that  show  a great  deal  of  repetition
internally  will  compress  more thoroughly  than  those  that are  largely
random; thus,  in general  a text file  will compress more  thoroughly than
will a  digitized sound  sample or  image (although there  are exceptions).
The higher  the level of  compression you request, the  more thoroughly the
file will  be compressed, but the  longer the machine will  have to work to
achieve it.  In most instances,  raising the level of compression very high
will save only a few bytes at a great cost in computer time.

You should  note, too, that  although compression algorithms  try very hard
not to lose information, it  is possible that compressing some very complex
files may result in a loss  of information: that is, if you compress a file
and de-compress  it, the de-compressed file  may be exactly the  same as it
was before  you first compressed  it.  These programs will  not affect most
everyday varieties of data; but you should be aware of this fact.

COHERENT comes  with the following tools  for compressing and uncompressing
files:

compress
     This  program  compresses files  uses  the  Lempel-Ziv algorithm.   By
     default,  it creates  a  file with  the  suffix .Z.   It replaces  the
     uncompressed original with its compressed analogue.

gtar This program  creates tape  archives.  Its  options -z and  -Z invoke,
     respectively, the  programs gzip and compress  to compress the archive
     as  it is  being  built, thus  permitting  you to  build a  compressed
     archive automatically.

gunzip
     This de-compresses files that had been compressed by the program gzip.
     By default, it works only with files that have the suffices .z or .gz.
     It replaces the compressed file with its uncompressed analogue.

gzip This program compresses files into  the zip format.  In general, it is
     faster and  more thorough than  compress, although it may  not work as
     well on  some files.  It replaces the  uncompressed original file with
     its compressed analogue.

uncompress
     This uncompresses files that had been compressed by compress. It works
     with files  that have the suffix .Z.  It  replaces the compressed file
     with its uncompressed analogue.

zcat This  program de-compresses  ``on  the fly''  programs  that had  been
     compressed  by  compress,  and writes  the  decompressed  form to  the
     standard output  device.  This is  useful if you  want to look  at the
     contents  of a  compressed file  but do  not want  to bother  with de-
     compressing all of it.

Default Suffixes

Compressed files  cannot be used  in their compressed form;  you must first
uncompress  them before  you  can use  them.   The key  to uncompressing  a
compressed file is figuring out what  program it was compressed with in the
first place, so you can apply the correct de-compression tool.

If you have  received a compressed file from a  third-party source, you may
have no idea what tool was used to compress the file; fortunately, however,
most compression  tools use standard  suffices to ``stamp''  the files they
compress.  The following  table gives commonly used suffices, plus examples
of how to uncompress files that bear them:

          Compression       Decompression    Example
Suffix    Program           Program
.Z        compress          uncompress       uncompress foo.Z
.tar.Z    tar|compress      uncompress|tar   zcat foo.tar.Z | tar xvf -
.z        gzip              gunzip           gunzip foo.z
.tar.z    tar|gzip          gunzip|tar       gunzip foo.tar.z ; tar xvf foo.tar
.tgz      gtar -cz          gtar -xz         gtar -xvzf foo.z
.gtz      Same as .tgz
.taz      Same as .tgz

See Also

compress,
gtar,
gunzip,
gzip,
uncompress,
Using COHERENT,
zcat