Compresses the specified files or standard input.
Each file is replaced by a file with the extension
.F, but only if the file got smaller. If no files are specified,
the compression is applied to the standard input
and is written to standard output regardless of the results.
Compressed files can be restored to their original form by specifying the
-d option, or by running
unfreeze (both linked to
freeze), on the
.F files or the standard input.
If the output file exists, it will not be overwritten unless the
-f flag is given. If
-f is not specified and
freeze is run in the foreground,
the user is prompted
as to whether the file should be overwritten.
-g flag is given, a slightly less powerful (compression
rate is 1.5% less), but somewhat faster heuristic is used. This flag can be
used more than once (this mode is quite useful when freezing bitmaps) for
If you want to improve compression rate at the cost of speed, use
-x flag. It means "maximum compression" (the speed may degrade
substantially when freezing bitmaps).
-f flag is given, all files specified are replaced with
.F files - even if the file didnt get smaller.
When file names are given, the ownership (if run by root), modes, accessed
and modified times are maintained between the file and its
.F version. In this respect,
freeze can be used for archival purposes, yet can still be used with
-c option causes the results of the freeze/melt operation to be written
to stdout; no files are changed. The
fcat program is the same as specifying
melt (all files are unpacked and written to stdout).
-v (verbose) option causes the diagnostics (at the end of each file processing)
to be printed to stderr, and the
-vv option causes the progress indicator to be drawn to the same place.
Type is a token preceded by a + or a --, which defines the type
of following files in the command string. An explicite definition
of the files type can give up to 2% of additional compression.
The list of types is stored in file
/usr/local/lib/freeze.cnf. Types may be abbreviated while not ambigious. You can also determine
values for the static Huffman table by using a list of 8 numbers
separated by commas instead of
Freeze uses the Lempel-Ziv algorithm on the first pass and the dynamic
Huffman algorithm on the second one. The size of sliding window
is 8K, and the maximum length of matched string is 256.
The positions on the window are coded using a static Huffman table.
A two byte magic number is prepended to the file
to ensure that neither melting of random text nor refreezing of
already frozen text are attempted. In addition, the characteristics
of the static Huffman table being used during
freeze is written to the file so that these characteristics may be adapted
to concrete conditions.
The amount of compression obtained depends on the size of the
input file and the distribution of character substrings and their
Typically, text files, such as C programs,
are reduced by 60-75%, executable files are reduced by 50%.
Compression is generally much better than that achieved by
LZW coding (as used in
compress), or Huffman coding
(pack), though takes more time to compute.
-V (version) flag is given, the programs version number and compilation
options are printed.
The exit status is normally 0;
if the last file gets bigger after freezing, the exit status is 2;
if an error occurs, the exit status is 1.