


     CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))             UUUUNNNNIIIIXXXX 5555....0000 ((((llllooooccccaaaallll))))              CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))



     NNNNAAAAMMMMEEEE
          compress, uncompress, zcat - compress and expand data

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
          ccccoooommmmpppprrrreeeessssssss [ ----ffff ] [ ----vvvv ] [ ----cccc ] [ ----VVVV ] [ ----bbbb _b_i_t_s ] [ _n_a_m_e ... ]
          uuuunnnnccccoooommmmpppprrrreeeessssssss [ ----ffff ] [ ----vvvv ] [ ----cccc ] [ ----VVVV ] [ _n_a_m_e ... ]
          zzzzccccaaaatttt [ ----VVVV ] [ _n_a_m_e ... ]

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
          _C_o_m_p_r_e_s_s reduces the size of the named files using adaptive
          Lempel-Ziv coding.  Whenever possible, each file is replaced
          by one with the extension ....ZZZZ,,,, while keeping the same
          ownership modes, access and modification times.  If no files
          are specified, the standard input is compressed to the
          standard output.  Compressed files can be restored to their
          original form using _u_n_c_o_m_p_r_e_s_s or _z_c_a_t.

          The ----ffff option will force compression of _n_a_m_e. This is useful
          for compressing an entire directory, even if some of the
          files do not actually shrink.  If ----ffff is not given and
          _c_o_m_p_r_e_s_s is run in the foreground, the user is prompted as
          to whether an existing file should be overwritten.

          The ----cccc option makes _c_o_m_p_r_e_s_s/_u_n_c_o_m_p_r_e_s_s write to the
          standard output; no files are changed.  The nondestructive
          behavior of _z_c_a_t is identical to that of _u_n_c_o_m_p_r_e_s_s ----cccc....

          _C_o_m_p_r_e_s_s uses the modified Lempel-Ziv algorithm popularized
          in "A Technique for High Performance Data Compression",
          Terry A. Welch, _I_E_E_E _C_o_m_p_u_t_e_r, vol. 17, no. 6 (June 1984),
          pp. 8-19.  Common substrings in the file are first replaced
          by 9-bit codes 257 and up.  When code 512 is reached, the
          algorithm switches to 10-bit codes and continues to use more
          bits until the limit specified by the ----bbbb flag is reached
          (default 16).  _B_i_t_s must be between 9 and 16.  The default
          can be changed in the source to allow _c_o_m_p_r_e_s_s to be run on
          a smaller machine.

          After the _b_i_t_s limit is attained, _c_o_m_p_r_e_s_s periodically
          checks the compression ratio.  If it is increasing, _c_o_m_p_r_e_s_s
          continues to use the existing code dictionary.  However, if
          the compression ratio decreases, _c_o_m_p_r_e_s_s discards the table
          of substrings and rebuilds it from scratch.  This allows the
          algorithm to adapt to the next "block" of the file.

          Note that the ----bbbb flag is omitted for _u_n_c_o_m_p_r_e_s_s, since the
          _b_i_t_s parameter specified during compression is encoded
          within the output, along with a magic number to ensure that
          neither decompression of random data nor recompression of
          compressed data is attempted.





     Page 1                                           (printed 1/1/86)






     CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))             UUUUNNNNIIIIXXXX 5555....0000 ((((llllooooccccaaaallll))))              CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))



          The amount of compression obtained depends on the size of
          the input, the number of _b_i_t_s 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
          _p_a_c_k), or adaptive Huffman coding (_c_o_m_p_a_c_t), and takes less
          time to compute.

          Under the ----vvvv option, a message is printed yielding the
          percentage of reduction for each file compressed.

          If the ----VVVV option is specified, the current version and
          compile options are printed on stderr.

          Exit status is normally 0; if the last file is larger after
          (attempted) compression, the status is 2; if an error
          occurs, exit status is 1.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
          pack(1), compact(1)

     DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
          Usage: compress [-dfvcV] [-b maxbits] [file ...]
                  Invalid options were specified on the command line.
          Missing maxbits
                  Maxbits must follow ----bbbb.
          _f_i_l_e: not in compressed format
                  The file specified to _u_n_c_o_m_p_r_e_s_s has not been
                  compressed.
          _f_i_l_e: compressed with _x_x bits, can only handle _y_y bits
                  _F_i_l_e was compressed by a program that could deal
                  with more _b_i_t_s than the compress code on this
                  machine.  Recompress the file with smaller _b_i_t_s.
          _f_i_l_e: already has .Z suffix -- no change
                  The file is assumed to be already compressed.
                  Rename the file and try again.
          _f_i_l_e: filename too long to tack on .Z
                  The file cannot be compressed because its name is
                  longer than 12 characters.  Rename and try again.
                  This message does not occur on BSD systems.
          _f_i_l_e 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 has been corrupted.
          Compression: _x_x._x_x%
                  Percentage of the input saved by compression.
                  (Relevant only for ----vvvv.)
          -- not a regular file: unchanged
                  When the input file is not a regular file, (e.g. a
                  directory), it is left unaltered.



     Page 2                                           (printed 1/1/86)






     CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))             UUUUNNNNIIIIXXXX 5555....0000 ((((llllooooccccaaaallll))))              CCCCOOOOMMMMPPPPRRRREEEESSSSSSSS((((1111))))



          -- has _x_x other links: unchanged
                  The input file has links; it is left unchanged.  See
                  _l_n(1) for more information.
          -- file unchanged
                  No savings is achieved by compression.  The input
                  remains virgin.

     BBBBUUUUGGGGSSSS
          Although compressed files are compatible between machines
          with large memory, ----bbbb12 should be used for file transfer to
          architectures with a small process data space (64KB or less,
          as exhibited by the DEC PDP series, the Intel 80286, etc.)











































     Page 3                                           (printed 1/1/86)



