home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / compress / compres4.lzh / compress.man < prev    next >
Text File  |  1990-10-25  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. COMPRESS(1)              USER COMMANDS                COMPRESS(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      compress, uncompress, zcat - compress and expand data
  10.  
  11. SYNOPSIS
  12.      compress [ -f ] [ -v ] [ -c ] [ -V ] [ -b _b_i_t_s ] [ _n_a_m_e ... ]
  13.      uncompress [ -f ] [ -v ] [ -c ] [ -V ] [ _n_a_m_e ... ]
  14.      zcat [ -V ] [ _n_a_m_e ... ]
  15.  
  16. DESCRIPTION
  17.      _C_o_m_p_r_e_s_s reduces the size of the named files using  adaptive
  18.      Lempel-Ziv coding.  Whenever possible, each file is replaced
  19.      by one with the extension .Z, while keeping the same  owner-
  20.      ship  modes, access and modification times.  If no files are
  21.      specified, the standard input is compressed to the  standard
  22.      output.   Compressed files can be restored to their original
  23.      form using _u_n_c_o_m_p_r_e_s_s or _z_c_a_t.
  24.  
  25.      The -f option will force compression of _n_a_m_e. This is useful
  26.      for  compressing  an  entire  directory, even if some of the
  27.      files do not actually  shrink.   If  -f  is  not  given  and
  28.      _c_o_m_p_r_e_s_s  is  run in the foreground, the user is prompted as
  29.      to whether an existing file should be overwritten.
  30.  
  31.      The -c option makes _c_o_m_p_r_e_s_s/_u_n_c_o_m_p_r_e_s_s write to  the  stan-
  32.      dard  output;  no  files  are  changed.   The nondestructive
  33.      behavior of _z_c_a_t is identical to that of _u_n_c_o_m_p_r_e_s_s -c.
  34.  
  35.      _C_o_m_p_r_e_s_s uses the modified Lempel-Ziv algorithm  popularized
  36.      in  "A  Technique  for  High  Performance Data Compression",
  37.      Terry A. Welch, _I_E_E_E _C_o_m_p_u_t_e_r, vol. 17, no. 6  (June  1984),
  38.      pp.  8-19.  Common substrings in the file are first replaced
  39.      by 9-bit codes 257 and up.  When code 512  is  reached,  the
  40.      algorithm switches to 10-bit codes and continues to use more
  41.      bits until the limit specified by the  -b  flag  is  reached
  42.      (default  16).   _B_i_t_s must be between 9 and 16.  The default
  43.      can be changed in the source to allow _c_o_m_p_r_e_s_s to be run  on
  44.      a smaller machine.
  45.  
  46.      After the _b_i_t_s  limit  is  attained,  _c_o_m_p_r_e_s_s  periodically
  47.      checks the compression ratio.  If it is increasing, _c_o_m_p_r_e_s_s
  48.      continues to use the existing code dictionary.  However,  if
  49.      the compression ratio decreases, _c_o_m_p_r_e_s_s discards the table
  50.      of substrings and rebuilds it from scratch.  This allows the
  51.      algorithm to adapt to the next "block" of the file.
  52.  
  53.      Note that the -b flag is omitted for _u_n_c_o_m_p_r_e_s_s,  since  the
  54.      _b_i_t_s  parameter  specified  during  compression  is  encoded
  55.      within the output, along with a magic number to ensure  that
  56.      neither  decompression  of  random data nor recompression of
  57.      compressed data is attempted.
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sun Release 4.0        Last change: local                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. COMPRESS(1)              USER COMMANDS                COMPRESS(1)
  71.  
  72.  
  73.  
  74.      The amount of compression obtained depends on  the  size  of
  75.      the input, the number of _b_i_t_s per code, and the distribution
  76.      of common substrings.  Typically, text such as  source  code
  77.      or  English  is reduced by 50-60%.  Compression is generally
  78.      much better than that achieved by Huffman coding (as used in
  79.      _p_a_c_k),  or adaptive Huffman coding (_c_o_m_p_a_c_t), and takes less
  80.      time to compute.
  81.  
  82.      Under the -v option, a message is printed yielding the  per-
  83.      centage of reduction for each file compressed.
  84.  
  85.      If the -V option is specified, the current version and  com-
  86.      pile options are printed on stderr.
  87.  
  88.      Exit status is normally 0; if the last file is larger  after
  89.      (attempted)  compression,  the  status  is  2;  if  an error
  90.      occurs, exit status is 1.
  91.  
  92. SEE ALSO
  93.      pack(1), compact(1)
  94.  
  95. DIAGNOSTICS
  96.      Usage: compress [-dfvcV] [-b maxbits] [file ...]
  97.              Invalid options were specified on the command line.
  98.      Missing maxbits
  99.              Maxbits must follow -b.
  100.      _f_i_l_e: not in compressed format
  101.              The  file  specified  to  _u_n_c_o_m_p_r_e_s_s  has  not  been
  102.              compressed.
  103.      _f_i_l_e: compressed with _x_x bits, can only handle _y_y bits
  104.              _F_i_l_e was compressed by a  program  that  could  deal
  105.              with  more  _b_i_t_s  than  the  compress  code  on this
  106.              machine.  Recompress the file with smaller _b_i_t_s.
  107.      _f_i_l_e: already has .Z suffix -- no change
  108.              The  file  is  assumed  to  be  already  compressed.
  109.              Rename the file and try again.
  110.      _f_i_l_e: filename too long to tack on .Z
  111.              The file cannot be compressed because  its  name  is
  112.              longer  than  12  characters.  Rename and try again.
  113.              This message does not occur on BSD systems.
  114.      _f_i_l_e already exists; do you wish to overwrite (y or n)?
  115.              Respond "y" if  you  want  the  output  file  to  be
  116.              replaced; "n" if not.
  117.      uncompress: corrupt input
  118.              A SIGSEGV violation was detected which usually means
  119.              that the input file has been corrupted.
  120.      Compression: _x_x._x_x%
  121.              Percentage  of  the  input  saved  by   compression.
  122.              (Relevant only for -v.)
  123.      -- not a regular file: unchanged
  124.              When the input file is not a regular file,  (e.g.  a
  125.              directory), it is left unaltered.
  126.  
  127.  
  128.  
  129. Sun Release 4.0        Last change: local                       2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. COMPRESS(1)              USER COMMANDS                COMPRESS(1)
  137.  
  138.  
  139.  
  140.      -- has _x_x other links: unchanged
  141.              The input file has links; it is left unchanged.  See
  142.              _l_n(1) for more information.
  143.      -- file unchanged
  144.              No savings is achieved by  compression.   The  input
  145.              remains virgin.
  146.  
  147. BUGS
  148.      Although compressed files are  compatible  between  machines
  149.      with  large memory, -b12 should be used for file transfer to
  150.      architectures with a small process data space (64KB or less,
  151.      as exhibited by the DEC PDP series, the Intel 80286, etc.)
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Sun Release 4.0        Last change: local                       3
  196.  
  197.  
  198.  
  199.