home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / SYSTEM / RECONFI2 / COMPRESS.MAN < prev    next >
Text File  |  1993-12-01  |  8KB  |  187 lines

  1.        COMPRESS(1)   MS-DOS Programmer's Manual   COMPRESS(1)
  2.        
  3.        NAME
  4.             compress, uncompress, zcat - compress or expand data
  5.        
  6.        SYNOPSIS
  7.             compress [-cdfivV] [-b bits] [name ...]
  8.             uncompress [-cfivV] [name ...]
  9.             zcat [-iV] [name ...]
  10.        
  11.        DESCRIPTION
  12.             Compress reduces the size of the named files using
  13.             adaptive Lempel-Ziv coding.  Whenever possible, each 
  14.             file is replaced by one with the extension .Z or XZ, 
  15.             while keeping the same modification times.  If no 
  16.             files are specified, the standard input is 
  17.             compressed to the standard output.  Compressed files 
  18.             can be restored to their original form using 
  19.             uncompress or zcat.
  20.        
  21.             The -c option makes compress/uncompress write to the
  22.             standard output; no files are changed.  The 
  23.             nondestructive behavior of zcat is identical to that
  24.             of uncompress -c.
  25.        
  26.             The -d (decompress) option makes compress restore
  27.             its input files to their normal form.  Uncompress is
  28.             identical to compress with the -d option specified.
  29.        
  30.             The -f option will force compression of "name". This
  31.             is useful for compressing an entire directory, even 
  32.             if some of the files do not actually shrink.  If -f
  33.             is not given, the user is prompted as to whether an 
  34.             existing file should be overwritten. 
  35.        
  36.             The -i (image mode) option suppresses the
  37.             transformation of text lines from MS-DOS (CR-LF 
  38.             delimited) form to UNIX (LF delimited) form during 
  39.             compression, and suppresses the reverse 
  40.             transformation during decompression. 
  41.        
  42.             The -v (verbose) option causes a message to be
  43.             printed, yielding the percentage of reduction for 
  44.             each file compressed. 
  45.        
  46.                                   1
  47.        COMPRESS(1)   MS-DOS Programmer's Manual   COMPRESS(1)
  48.        
  49.        
  50.             The -V option causes the current version and compile
  51.             options to be printed on stderr. 
  52.        
  53.             Compress uses the modified Lempel-Ziv algorithm
  54.             popularized in "A Technique for High Performance 
  55.             Data Compression", Terry A. Welch, IEEE Computer,
  56.             vol. 17, no. 6 (June 1984), pp. 8-19.  Common 
  57.             substrings in the file are first replaced by 9-bit 
  58.             codes 257 and up.  When code 512 is reached, the 
  59.             algorithm switches to 10-bit codes and continues to 
  60.             use more bits until the limit specified by the -b
  61.             flag is reached (default is the maximum for which 
  62.             the program was built). 
  63.        
  64.             "Bits" must be between 9 and the lesser of 16, and 
  65.             the limit imposed at compile-time.  The MS-DOS 
  66.             version of compress comes in two sizes.  One has a
  67.             12-bit limit, and will run in a machine with 128K 
  68.             bytes of available user memory.  The other has a 
  69.             16-bit limit, and requires about 450K bytes to run. 
  70.        
  71.             After the "bits" limit is attained, compress
  72.             periodically checks the compression ratio.  If it is 
  73.             increasing, compress continues to use the existing
  74.             code dictionary.  However, if the compression ratio 
  75.             decreases, compress discards the table of substrings
  76.             and rebuilds it from scratch.  This allows the 
  77.             algorithm to adapt to the next "block" of the file. 
  78.        
  79.             Note that the -b flag is omitted for uncompress,
  80.             since the "bits" parameter specified during 
  81.             compression is encoded within the output, along with 
  82.             a magic number to ensure that neither decompression 
  83.             of random data nor recompression of compressed data 
  84.             is attempted. 
  85.        
  86.             The amount of compression obtained depends on the 
  87.             size of the input, the number of "bits" per code, 
  88.             and the distribution of common substrings.  
  89.             Typically, text such as source code or English is 
  90.             reduced by 50-60%.  Compression is generally much 
  91.        
  92.                                   2
  93.        COMPRESS(1)   MS-DOS Programmer's Manual   COMPRESS(1)
  94.        
  95.             better than that achieved by Huffman coding (as used 
  96.             in SQ), and takes less time to compute. 
  97.        
  98.             Exit status is normally 0; if the last file is 
  99.             larger after (attempted) compression, the status is 
  100.             2; if an error occurs, exit status is 1. 
  101.        
  102.        SEE ALSO
  103.             SQ(1) 
  104.        
  105.        DIAGNOSTICS
  106.             Usage: compress [-cdfivV] [-b maxbits] [file ...] 
  107.                 Invalid options were specified on the command 
  108.                 line. 
  109.             Missing maxbits
  110.                 Maxbits must follow -b. 
  111.             file: not in compressed format
  112.                 The file specified to UNCOMPRESS has not been 
  113.                 compressed. 
  114.             file: compressed with xx bits, can only handle yy bits 
  115.                 "File" was compressed by a program that could 
  116.                 deal with more "bits" than the compress code on 
  117.                 this machine.  Recompress the file with smaller 
  118.                 "bits". 
  119.             file: already has xx suffix -- no change
  120.                 The file is assumed to be already compressed 
  121.                 because the last two characters of its extension 
  122.                 are ".Z" or "XZ".  Rename the file and try 
  123.                 again. 
  124.             fn: part of filename extension will be replaced by XZ
  125.                 File name, fn, contains at least two characters 
  126.                 in the "extension" field.  The second and third 
  127.                 will be replaced by "XZ" in the compressed 
  128.                 file's name. 
  129.             fn already exists; do you wish to overwrite fn?
  130.                 Respond "y" if you want the output file, fn, to 
  131.                 be replaced; "n" if not. 
  132.             Compression: xx.xx%
  133.                 Percentage of the input saved by compression. 
  134.                 (Relevant only for -v.) 
  135.             -- file unchanged
  136.                 No savings is achieved by compression.  The 
  137.        
  138.                                   3
  139.        COMPRESS(1)   MS-DOS Programmer's Manual   COMPRESS(1)
  140.        
  141.                 input remains virgin. 
  142.        
  143.        BUGS
  144.             Although compressed files are compatible between 
  145.             machines with large memory, -b12 should be used for 
  146.             file transfer to architectures with a small process 
  147.             data space (64KB or less, as exhibited by the DEC 
  148.             PDP series, or the small MS-DOS version, for 
  149.             example). 
  150.        
  151.             MS-DOS version 2 does not permit a program to 
  152.             determine the name used to call it.  As a result, 
  153.             the aliases, uncompress and zcat, cannot be used.
  154.             They can be used under MS-DOS version 3, though the 
  155.             actual file name for uncompress will be
  156.             "uncompre.exe". 
  157.        
  158.             MS-DOS does not support UNIX-style file links.  As a 
  159.             result, even though compress, uncompress and zcat
  160.             are all the same program, it (they) will have to be 
  161.             stored three times, once under each of the three 
  162.             names, in order to use them under MS-DOS version 3.  
  163.             As explained in the previous paragraph, this is not 
  164.             an option under MS-DOS version 2.
  165.        
  166.        
  167.        
  168.        
  169.        
  170.        
  171.        
  172.        
  173.        
  174.        
  175.        
  176.        
  177.        
  178.        
  179.        
  180.        
  181.        
  182.        
  183.        
  184.                                   4
  185.  
  186. !
  187.