Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

OLD-COMPACT(1)              General Commands Manual             OLD-COMPACT(1)

       old-compact,  old-uncompact,  old-ccat - compress and uncompress files,
       and cat them

       /usr/old/compact [ filename...  ]

       uncompact [ filename...  ]

       ccat [ filename...  ]

       Note: This program is considered to be obsolete, and will not  be  dis-
       tributed or supported in future Sun releases.

       compact  compresses the named files using an adaptive Huffman code.  If
       no file names are given, the standard input is compacted to  the  stan-
       dard  output.   compact  operates as an on-line algorithm.  Each time a
       byte is read, it is encoded immediately according to the current prefix
       code.   This code is an optimal Huffman code for the set of frequencies
       seen so far.  It is unnecessary to prepend a decoding tree to the  com-
       pressed  file since the encoder and the decoder start in the same state
       and stay synchronized.  Furthermore, compact and uncompact can  operate
       as filters.  In particular:

              ... | compact | uncompact | ...

       operates as a (very slow) no-op.

       When  an argument file is given, it is compacted and the resulting file
       is placed in file.C; file is removed.  The first two bytes of the  com-
       pacted  file  code  the  fact that the file is compacted.  This code is
       used to prohibit recompaction.

       The amount of compression to be expected depends on the  type  of  file
       being  compressed.  Typical values of compression are: Text (38%), Pas-
       cal Source (43%), C Source (36%) and Binary (19%).   These  values  are
       the percentages of file bytes reduced.

       uncompact  restores  the  original file from a file called file.C which
       was compressed by compact.  If no file names are  given,  the  standard
       input is uncompacted to the standard output.

       ccat  cats the original file from a file compressed by compact, without
       uncompressing the file.

       *.C                 compacted  file  created  by  compact,  removed  by

       Gallager, Robert G., Variations on a Theme of Huffman, I.E.E.E.  Trans-
       actions on Information Theory, vol. IT-24, no. 6,  November  1978,  pp.
       668 - 674.

                               24 September 1987                OLD-COMPACT(1)