home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pcboard / uupcb100.zip / COMP430D.DOC < prev    next >
Text File  |  1990-03-03  |  7KB  |  155 lines

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