compact \- compress files
compresses the named files using an adaptive
Huffman code. If no file names are given,
then the standard input is compacted to
operates as an on-line algorithm.
Each time a byte is read,
it is encoded immediately
according to the current prefix
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 compressed file (as in
\b), since the encoder (
\b
\b) start in the same state and stay
... | compact | uncompact | ...
operates as a (very slow) no-op.
and the resulting file is placed in
The first two bytes of the
fact that the file is compacted.
This code is used to prohibit
The amount of compression
on the type of file being compressed.
Typical values of compression are:
Text (38%), Pascal Source (43%),
C Source (36%) and Binary (19%).
These values are the percentages
The last segment of the filename must
contain fewer than thirteen characters
to allow space for the appended '.C'.
Directories cannot (and should not)
Compact will not compress directories.
Also messages about unopenable files, etc.
No attempt will be made to compress files
which have already been compressed by
Input files unlinked (unless protected)
Gallager, Robert G., "Variations on a Theme by Huffman",
vol. IT-24, no. 6, November 1978, pp. 668 - 674.