compress(1)           MPE/iX Shell and Utilities           compress(1)
  ______________________________________________________________________

  NAME
       compress -- Lempel-Ziv compression of a file

  SYNOPSIS
       compress [-cDdfVv] [-b bits] [file...]

  DESCRIPTION
       compress compresses each input file using Lempel-Ziv compression
       techniques.  If you do not specify any input files, compress
       reads data from the standard input and writes the compressed
       result to the standard output.

       On UNIX and POSIX-compliant systems, the output files have the
       same names as the input files but with a .Z suffix.  For example,
       abc is compressed into abc.Z.  If the .Z file already exists and
       you did not specify the -f option, compress gives an error and
       asks you whether or not it should overwrite the existing file.

       compress uses the modified Lempel-Ziv algorithm (described in A
       Technique for High Performance Data Compression, Terry A. Welch,
       IEEE Computer, vol. 17, no. 6 (June 1984), pp. 8-19).  compress
       first replaces common substrings in the file by 9-bit codes
       starting at 257.  After it reaches code 512, compress begins with
       10-bit codes, and continues to use more bits until it reaches the
       limit set by the -b option.

       After attaining the bits limit, compress periodically checks the
       compression ratio.  If it is increasing, compress continues to
       use the existing code dictionary.  However, if the compression
       ratio decreases, compress discards the table of substrings and
       rebuilds it from scratch.  This allows the algorithm to compen-
       sate for files, such as archives, where individual components
       have different information content profiles.

  Options
       compress accepts the following options:

       -b bits
            limits the maximum number of bits of compression to bits.
            The value bits may be an integer from 9 to 16.  The default
            is 16.

       -c   writes the output to the standard output.  When you use this
            option, you can only specify one file on the command line.

       -D   performs an extra degree of compression on files such as
            sorted dictionaries where consecutive lines normally have
            many characters in common.

       -d   decompresses argument files instead of compressing them.
            This works by overlaying the compress program with the
            uncompress program.  For this to work, uncompress must be
            available somewhere in your search path (given by the PATH

                                                                       1

  compress(1)           MPE/iX Shell and Utilities           compress(1)
  ______________________________________________________________________

            environment variable).  Decompressing files this way is
            slower than calling uncompress directly.

       -f   forces compression even if the resulting file is larger or
            the output file already exists.  When you do not specify
            this option, files which are larger after compression are
            not compressed.  compress does not print an error message if
            this happens.

       -V   prints the version number of compress.

       -v   prints statistics giving the amount of compression achieved.
            Statistics give the name of each file compressed and the
            compression ratio, expressed as a percentage.  If the file
            resulting from compression is larger than the original, the
            compression ratio is negative.

  ENVIRONMENT VARIABLES
       compress uses the following environment variable:

       PATH contains a list of directories for compress to search when
            looking for the uncompress utility.

  DIAGNOSTICS
       Possible exit status values are:

       0  Successful completion.

       1  An error occurred.

       2  One or more files were not compressed because the compressed
          version was larger than the original.

  Messages

       Message:  (-D) same count exceeded - aborting
       Cause:    When using the -D option, compress encountered a line
                 where more than the first 255 characters were identical
                 to those of the previous line.
       Action:   Make sure that no two adjacent lines in a file being
                 with -D have more than the first 255 characters in com-
                 mon.

       Message:  Bits must be between num1 and num2
       Cause:    You specified a value for the maximum number of bits of
                 compression with the -b option that fell outside of the
                 range num1 to num2.
       Action:   Specify a value that falls in the num1 to num2 range.

       Message:  can't stat file "filename": system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

                                                                       2

  compress(1)           MPE/iX Shell and Utilities           compress(1)
  ______________________________________________________________________

       Message:  exec "uncompress": system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

       Message:  file "filename": system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

       Message:  filename has num other links: unchanged
       Cause:    You specified a file that had more than one link.
                 compress will not compress such a file.
       Action:   Remove the additional links, or use -f option.

       Message:  filename not a regular file: unchanged
       Cause:    You specified a file that was not a regular file.
                 compress will not compress directories, FIFOs, or other
                 such files.
       Action:   Make sure that the specified filename is a regular
                 file.

       Message:  input file "filename": system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

       Message:  insufficient memory
       Cause:    There were not enough free system resources to perform
                 the specified operation.
       Action:   Free up more resources.

       Message:  no space for compression tables There were not enough
                 free system resources to allocate to compression
                 tables.
       Action:   Free up more resources.  "Option -option argument miss-
                 ing"
       Cause:    You did not provide an argument for -option.
       Action:   Provide the missing argument.

       Message:  output file "filename": system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

       Message:  output path or file name too long
       Cause:    When the .Z extension was appended to the original
                 file's name, it resulted in an output path or file name
                 that was too long for the file system to handle.
       Action:   Rename the original file with a shorter name.

       Message:  tempfile: system error
       Cause:    See syserror(3).
       Action:   See syserror(3).

                                                                       3

  compress(1)           MPE/iX Shell and Utilities           compress(1)
  ______________________________________________________________________

       Message:  unable to create tempfile name
       Cause:    compress was unable to create a temporary file in the
                 directory named by TMPDIR, the /tmp directory, or the
                 current directory.
       Action:   Make sure that you have appropriate permissions to cre-
                 ate a temporary file in one of these three directories.

       Message:  unknown error
       Cause:    An unknown compression error occurred.
       Action:   Contact your system manager.

       Message:  Unknown option "-option"
       Cause:    You specified an option that is not valid for compress.
       Action:   Check the DESCRIPTION section of this man page for a
                 list of valid compress options.

  LIMITS
       This implementation of compress is limited to a maximum of 16 bit
       compression.

  PORTABILITY
       A binary-compatible version of compress, with more options
       including the ability to compress in place, is often found on
       UNIX systems.

       The -D option is an extension to traditional implementations of
       compress.

  MPE/iX NOTES
       The current MPE/iX implementation of compress converts non-byte
       files to byte stream files before compressing them. File charac-
       teristics like file code, record size, and so forth are not pre-
       served by this conversion.  When you decompress the compressed
       file, it is written as a byte stream file.

       For more information on how the current MPE/iX implementation may
       affect the operation of this utility, see Appendix A, MPE/iX
       Implementation Considerations.

  SEE ALSO
       cpio(1), pack(1), pax(1), tar(1), uncompress(1), unpack(1)
       zcat(1)

                                                                       4