home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / compress / comprs43.lzh / compress.man < prev    next >
Text File  |  1991-03-27  |  6KB  |  149 lines

  1. COMPRESS 1 local
  2.  
  3. NAME compress, uncompress, zcat - compress and expand data
  4.  
  5. SYNOPSIS
  6.  
  7.      compress [-cCdDf?hkKvV][-b maxbits][-Iinpath][-Ooutpath][filenames...]
  8.      uncompress [-fCcvVkK?h][-Iinpath][-Ooutpath][filenames...]
  9.      zcat [-CvV?h][-Iinpath][-Ooutpath][filenames...]
  10.  
  11.      Argument Processing..case is significant:
  12.      MUST use '-' for switch character, all flags are optional.
  13.  
  14.      [options]
  15.      -V => print Version
  16.      -d => do_decomp default = off
  17.      -v => verbose
  18.      -f => force overwrite of output file default = off
  19.      -n => no header: useful to uncompress old files
  20.      -c => cat all output to stdout default = off
  21.      -C => generate output compatible with compress 2.0
  22.      -k => %s input file, default = keep
  23.      -K => %s output file on error, default = kill
  24.      -b maxbits  => default = 16  bits
  25.      -I pathname => infile path  = none
  26.      -O pathname => outfile path = none
  27.      -? -h => help, print full usage message
  28.  
  29. DESCRIPTION
  30.  
  31. This manual refers to compress v4.10 don release. The compression and
  32. decompression routines are modified from the current version 4.0 joe release.
  33. However, the compressed output is cross compatible.
  34.  
  35. Compress reduces the size of the named files using adaptive Lempel-Ziv coding.
  36. Whenever possible, each file is replaced by one with the extension .Z,
  37. while keeping the same ownership modes, access and modification times.
  38. If no files are specified, the standard input is compressed to the
  39. standard output.Compressed files can be restored to their original form using
  40. uncompress or zcat.
  41.  
  42. The -f option will force compression of name. This is useful for compressing
  43. an entire directory, even if some of the files do not actually shrink.
  44. If -f is not given and compress is run in the foreground,
  45. the user is prompted as to whether an existing file should be overwritten.
  46.  
  47. The -c option makes compress/uncompress write to the standard output;
  48. no files are changed.  The nondestructive behavior of zcat is identical to
  49. that of uncompress -c.
  50.  
  51. Compress uses the modified Lempel-Ziv algorithm popularized in
  52. "A Technique for High Performance Data Compression", Terry A. Welch,
  53. "IEEE Computer," vol. 17, no. 6 (June 1984), pp. 8-19.
  54. Common substrings in the file are first replaced by 9-bit codes 257 and up.
  55. When code 512 is reached, the algorithm switches to 10-bit codes and
  56. continues to use more bits until the limit specified by the -b
  57. flag is reached (default 16). Bits must be between 9 and 16.  The default
  58. can be changed in the source to allow compress to be run on a smaller machine.
  59.  
  60. After the bits limit is attained, compress periodically checks the compression
  61. ratio.  If it is increasing, compress continues to use the existing code
  62. dictionary.  However, if the compression ratio decreases, compress
  63. discards the table of substrings and rebuilds it from scratch.  This allows
  64. the algorithm to adapt to the next "block" of the file.
  65.  
  66. Note that the -b flag is omitted for uncompress, since the bits
  67. parameter specified during compression is encoded within the output,
  68. along with a magic number to ensure that neither decompression of random
  69. data nor recompression of compressed data is attempted.
  70.  
  71. The amount of compression obtained depends on the size of the input, the
  72. number of bits per code, and the distribution of common substrings.
  73. Typically, text such as source code or English is reduced by 50-60%.
  74. Compression is generally much better than that achieved by Huffman coding
  75. (as used in pack ), or adaptive Huffman coding ( compact ),
  76. and takes less time to compute.
  77.  
  78. Under the -v option, a message is printed yielding the percentage of
  79. reduction for each file compressed.
  80.  
  81. If the -V option is specified, the current version and compile options
  82. are printed on stderr.
  83.  
  84. CAVEATS
  85.  
  86.  
  87. FILES
  88.  
  89.  
  90. RETURN VALUE
  91.  
  92. Exit status is normally 0;
  93. if the last file is larger after (attempted) compression, the status is 2;
  94. if an error occurs, exit status is 1.
  95.  
  96. SEE ALSO
  97.         pack(1), compact(1)
  98.  
  99. DIAGNOSTICS
  100.         Usage: compress [\-dfvcV] [\-b maxbits] [file ...]
  101.                 Invalid options were specified on the command line.
  102.         Missing maxbits
  103.                 Maxbits must follow -b.
  104.         file : not in compressed format
  105.                 The file specified to uncompress has not been compressed.
  106.         file : compressed with bits, can only handle yy bits
  107.                 File was compressed by a program that could deal with
  108.                 more bits than the compress code on this machine.
  109.                 Recompress the file with smaller bits.
  110.         file : already has .Z suffix -- no change
  111.                 The file is assumed to be already compressed.
  112.                 Rename the file and try again.
  113.         file : filename too long to tack on .Z
  114.                 The file cannot be compressed because its name is longer than
  115.                 12 characters.  Rename and try again.
  116.                 This message does not occur on BSD systems.
  117.         file already exists; do you wish to overwrite (y or n)?
  118.         Respond "y" if you want the output file to be replaced; "n" if not.
  119.         uncompress: corrupt input
  120.                 A SIGSEGV violation was detected which usually means that
  121.                 the input file has been corrupted.
  122.         Compression: "xx.xx%"
  123.                 Percentage of the input saved by compression.
  124.                 (Relevant only for -v.)
  125.         -- not a regular file: unchanged
  126.                 When the input file is not a regular file,
  127.                 (e.g. a directory), it is left unaltered.
  128.         -- has other links: unchanged
  129.                 The input file has links; it is left unchanged.  See
  130.                 ln "(1)" for more information.
  131.         -- file unchanged
  132.                 No savings is achieved by compression.  The input remains
  133.                 virgin.
  134.  
  135. BUGS
  136.  
  137. Although compressed files are compatible between machines with large memory,
  138. -b 12 should be used for file transfer to architectures with
  139. a small process data space (64KB or less, as exhibited by the DEC PDP
  140. series, the Intel 80286, etc.)
  141.  
  142. MISCELLANEOUS
  143.  
  144.  
  145. NOTES
  146.  
  147.  
  148.  
  149.