COMPACT(1) BSD COMPACT(1)
NAME
compact, uncompact, ccat - compress and uncompress files, and then cat
them
SYNOPSIS
compact [ name ... ]
uncompact [ name ... ]
ccat [ file ... ]
DESCRIPTION
NOTE: The compact command is obsolete; it has been replaced by
compress(1). The uncompact command is provided to allow you to restore
files compressed by compact.
compact compresses the named files using an adaptive Huffman code. If
you do not specify a filename, compact compacts the standard input to the
standard 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. You do not need to prefix a decoding tree to the
compressed 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 you specify an argument file, compact compacts it, places the
resulting file in file.C, and removes file. The first two bytes of the
compacted 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 compression values are text (38%), Pascal
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 compressed by compact.
If you do not specify a filename, uncompact uncompacts the standard input
to the standard output.
ccat concatenates the original file from a file compressed by compact,
without uncompressing the file.
BUGS
The last segment of the filename must contain fewer than 30 characters to
allow space for the .C that is appended.
FILES
*.C Compacted file created by compact, removed by uncompact
SEE ALSO
compress(1)