home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Utilities / DE_TarreDemo / DemoFiles / CompressMe < prev   
Text File  |  1992-07-28  |  5KB  |  84 lines

  1. -------------------------------------------------------------------------------
  2. Compress reduces the size of files using adaptive Lempel-Ziv coding.  The following is quoted from the UNIX man page for compress:
  3.  
  4.      Compress uses the modified Lempel-Ziv algorithm popularized
  5.      in "A Technique for High Performance Data Compression",
  6.      Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984),
  7.      pp. 8-19.  Common substrings in the file are first replaced
  8.      by 9-bit codes 257 and up.  When code 512 is reached, the
  9.      algorithm switches to 10-bit codes and continues to use more
  10.      bits until the limit (default is 16 bits) is reached.
  11.  
  12.      After the bits limit is attained, compress periodically
  13.      checks the compression ratio.  If it is increasing, compress
  14.      continues to use the existing code dictionary.  However, if
  15.      the compression ratio decreases, compress discards the table
  16.      of substrings and rebuilds it from scratch.  This allows the
  17.      algorithm to adapt to the next "block" of the file.
  18.  
  19.      The amount of compression obtained depends on the size of
  20.      the input, the number of bits per code, and the distribution
  21.      of common substrings.  Typically, text such as source code
  22.      or English is reduced by 50-60%.  Compression is generally
  23.      much better than that achieved by Huffman coding (as used in
  24.      pack), or adaptive Huffman coding (compact), and takes less
  25.      time to compute.
  26.  
  27. Tar, on the other hand, is responsible for saving and restoring multiple files from a single file.  Coupled with compress, the two form a powerful utility for archiving files.  A compressed archive may be stored on floppy disk for backup purposes or transmitted over a modem.
  28.  
  29. In general, small files do not compress very well.  For that reason the above text has been repeated several times below to make a better example file.
  30. -------------------------------------------------------------------------------
  31.  
  32. Compress reduces the size of files using adaptive Lempel-Ziv coding.  The following is quoted from the UNIX man page for compress:
  33.  
  34.      Compress uses the modified Lempel-Ziv algorithm popularized
  35.      in "A Technique for High Performance Data Compression",
  36.      Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984),
  37.      pp. 8-19.  Common substrings in the file are first replaced
  38.      by 9-bit codes 257 and up.  When code 512 is reached, the
  39.      algorithm switches to 10-bit codes and continues to use more
  40.      bits until the limit (default is 16 bits) is reached.
  41.  
  42.      After the bits limit is attained, compress periodically
  43.      checks the compression ratio.  If it is increasing, compress
  44.      continues to use the existing code dictionary.  However, if
  45.      the compression ratio decreases, compress discards the table
  46.      of substrings and rebuilds it from scratch.  This allows the
  47.      algorithm to adapt to the next "block" of the file.
  48.  
  49.      The amount of compression obtained depends on the size of
  50.      the input, the number of bits per code, and the distribution
  51.      of common substrings.  Typically, text such as source code
  52.      or English is reduced by 50-60%.  Compression is generally
  53.      much better than that achieved by Huffman coding (as used in
  54.      pack), or adaptive Huffman coding (compact), and takes less
  55.      time to compute.
  56.  
  57. Tar, on the other hand, is responsible for saving and restoring multiple files from a single file.  Coupled with compress, the two form a powerful utility for archiving files.  A compressed archive may be stored on floppy disk for backup purposes or transmitted over a modem.
  58. Compress reduces the size of files using adaptive Lempel-Ziv coding.  The following is quoted from the UNIX man page for compress:
  59.  
  60.      Compress uses the modified Lempel-Ziv algorithm popularized
  61.      in "A Technique for High Performance Data Compression",
  62.      Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984),
  63.      pp. 8-19.  Common substrings in the file are first replaced
  64.      by 9-bit codes 257 and up.  When code 512 is reached, the
  65.      algorithm switches to 10-bit codes and continues to use more
  66.      bits until the limit (default is 16 bits) is reached.
  67.  
  68.      After the bits limit is attained, compress periodically
  69.      checks the compression ratio.  If it is increasing, compress
  70.      continues to use the existing code dictionary.  However, if
  71.      the compression ratio decreases, compress discards the table
  72.      of substrings and rebuilds it from scratch.  This allows the
  73.      algorithm to adapt to the next "block" of the file.
  74.  
  75.      The amount of compression obtained depends on the size of
  76.      the input, the number of bits per code, and the distribution
  77.      of common substrings.  Typically, text such as source code
  78.      or English is reduced by 50-60%.  Compression is generally
  79.      much better than that achieved by Huffman coding (as used in
  80.      pack), or adaptive Huffman coding (compact), and takes less
  81.      time to compute.
  82.  
  83. Tar, on the other hand, is responsible for saving and restoring multiple files from a single file.  Coupled with compress, the two form a powerful utility for archiving files.  A compressed archive may be stored on floppy disk for backup purposes or transmitted over a modem.
  84.