***** UNIX manual page for "compress" (on SunOs 4.0.3 at Nordita.).   *****
***** (Options are different in the VMS version. To see them, type    *****
*****     $ compress -c   ! Display error msg with available options.)*****

5:man compress

COMPRESS(1)              USER COMMANDS                COMPRESS(1)

NAME
     compress, uncompress,  zcat  -  compress  or  expand  files,
     display expanded contents

SYNOPSIS
     compress [ -cfv ] [ -b bits ] [ filename...  ]

     uncompress [ -cv ] [ filename...  ]

     zcat [ filename...  ]

DESCRIPTION
     compress reduces the size of the named files using  adaptive
     Lempel-Ziv coding.  Whenever possible, each file is replaced
     by one with the extension .Z, while keeping the same  owner-
     ship  modes,   as well as access and modification times.  If
     no files are specified, the standard input is compressed  to
     the standard output.

     The amount of compression obtained depends on  the  size  of
     the input, the number of bits per code, and the distribution
     of common substrings.  Typically, text such as  source  code
     or  English  is reduced by 50-60%.  Compression is generally
     much better than that achieved by Huffman coding (as used in
     pack(1)),  or  adaptive  Huffman coding (oldcompact(1)), and
     takes less time to compute.  The  bits  parameter  specified
     during  compression  is  encoded within the compressed file,
     along with a magic number to ensure that neither  decompres-
     sion  of random data nor recompression of compressed data is
     subsequently allowed.

     Compressed files can be  restored  to  their  original  form
     using uncompress.

     zcat produces uncompressed output on  the  standard  output,
     but leaves the compressed .Z file intact.

OPTIONS
     -c   Write to the standard output;  no  files  are  changed.
          The  nondestructive  behavior  of  zcat is identical to
          that of `uncompress -c'.

     -f   Force compression, even if the file does  not  actually
          shrink,  or  the  corresponding .Z file already exists.
          Except  when   running   in   the   background   (under
          /usr/bin/sh),  if  -f  is  not  given, prompt to verify
          whether an existing .Z file should be overwritten.

     -v   Verbose.  Display the  percentage  reduction  for  each
          file compressed.

     -b bits

Sun Release 4.0   Last change: 9 September 1987                 1

COMPRESS(1)              USER COMMANDS                COMPRESS(1)

          Set the upper limit  (in  bits)  for  common  substring
          codes.   bits  must  be  between  9  and  16 (16 is the
          default).

FILES
     /usr/bin/sh

SEE ALSO
     ln(1), oldcompact(1), pack(1)

     A Technique for High Performance Data Compression, Terry  A.
     Welch, IEEE Computer, vol. 17, no. 6 (June 1984), pp. 8-19.

DIAGNOSTICS
     Exit status is  normally  0.   If  the  last  file  was  not
     compressed because it became larger, the status is 2.  If an
     error occurs, exit status is 1.

     Usage: compress [-fvc] [-b maxbits] [filename...]
               Invalid options  were  specified  on  the  command
               line.

     Missing maxbits
               Maxbits must follow -b .

     filename: not in compressed format
               The file specified  to  uncompress  has  not  been
               compressed.

     filename: compressed with xxbits, can only handle yybits
               filename was compressed by a  program  that  could
               deal with more bits than the compress code on this
               machine.  Recompress the file with smaller bits.

     filename: already has .Z suffix -- no change
               The file is  assumed  to  be  already  compressed.
               Rename the file and try again.

     filename: already exists; do you wish to overwrite (y or n)?
               Respond y if  you  want  the  output  file  to  be
               replaced; n if not.

     uncompress: corrupt input
               A SIGSEGV violation was  detected,  which  usually
               means that the input file is corrupted.

     Compression:  xx.xx%
               Percentage of  the  input  saved  by  compression.
               (Relevant only for -v.)

     -- not a regular file: unchanged
               When the input file is not a regular  file,  (such

Sun Release 4.0   Last change: 9 September 1987                 2

COMPRESS(1)              USER COMMANDS                COMPRESS(1)

               as a directory), it is left unaltered.

     -- has xx other links: unchanged
               The input file has links; it  is  left  unchanged.
               See ln(1) for more information.

     -- file unchanged
               No savings are achieved by compression.  The input
               remains uncompressed.

BUGS
     Although compressed files are  compatible  between  machines
     with  large memory, -b12 should be used for file transfer to
     architectures with a  small  process  data  space  (64KB  or
     less).

     compress should be more flexible about the existence of  the
     .Z suffix.

Sun Release 4.0   Last change: 9 September 1987                 3

