FREEZE(1)
π¦ FREEZE(1) π¦
okay so bestie, sit down, hydrate, because today we're talking about freeze (and its girlies unfreeze, melt, and fcat) β the compress-and-uncompress squad from the General Commands Manual. no cap, this one's a classic. π«Ά
β¨ NAME β¨
freeze, unfreeze, melt, fcat β compress and uncompress files. that's the whole job description, she's booked and busy π
β¨ SYNOPSIS β¨
freeze [ -cdfvVgx ] [ filename | type ... ]
unfreeze [ -cfvV ] [ filename ... ]
melt [ -cfvV ] [ filename ... ]
fcat [ filename ... ]
β¨ DESCRIPTION β¨
π the basic tea
So here's the deal: freeze compresses the files you name, or standard input if you don't name anything. Each file gets replaced by a file with the extension .F β but ONLY if the file actually got smaller. no glow-up, no rewrite, we don't do that here. β¨
If you specify no files at all, the compression is applied to the standard input and is written to standard output regardless of the results. (yes, regardless. even if it didn't shrink. she said "here's your output, take it or leave it.")
Compressed files can be restored to their original form by specifying the -d option, or by running melt or unfreeze (both of which are linked to freeze, they're the same girl in different outfits π) on the .F files or the standard input.
If the output file already 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. (very "do you really want to do this" of her.)
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 make(1) after melting. archival queen behavior, honestly π
π the flags (yes bestie, here they are)
-dβ decompress mode. restores compressed files back to their original form instead of squishing them.-fβ force it. all files specified are replaced with.Ffiles β even if the file didn't get smaller. also disables the "do you wanna overwrite?" prompt situation. use responsibly, she's loud π₯-gβ a slightly less powerful heuristic (compression rate is 1.5% less), but somewhat faster. This flag can be used more than once for additional speedup β this mode is quite useful when freezing bitmaps. (stack it like a filter, fr fr π)-xβ "maximum compression" mode. use this when you want to improve the compression rate at the cost of speed. the speed may degrade substantially when freezing bitmaps. π-cβ causes the results of thefreeze/meltoperation to be written to stdout; no files are changed. Thefcatprogram is the same as specifying-ctomelt(all files are unpacked and written to stdout). she's just showing you the tea, not touching your stuff β¨-vβ verbose. causes the diagnostics (at the end of each file processing) to be printed to stderr.-vvβ extra verbose. causes the progress indicator to be drawn to that same place. π¦-Vβ version. if this flag is given, the program's version number and compilation options are printed.
πΈ types, and how you declare them
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 file's type can give up to 2% of additional compression. The list of types is stored in file /usr/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 type. π
π§ the algorithm lore (she's smart, keep up)
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 probabilities. 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. so yeah, she ate π
β exit status
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.
β¨ SEE ALSO β¨
compact(1), pack(1), compress(1) β go read the cousins, they're cute too π
β¨ DIAGNOSTICS β¨
bestie, here's the full roster of messages she might say to you. every single one, no skipping π
Unknown flag: Β΄xΒ΄; Usage: freeze [-cdfvVg] [file|+type ...]β Invalid options were specified on the command line.file: not in frozen formatβ The specified file has not been frozen.file: already has .F suffix -- no changeβ Cannot compress a file that has a.Fsuffix.mv(1)the file to a different name and try again.file: filename too long to tack on .Fβ The specified file cannot be compressed because its filename is longer than 12 characters.mv(1)the file to a different name and try again. This message does not occur on 4.XBSD systems.file already exists; do you wish to overwrite (y or n)?β Respond"y"if you want the output file to be replaced;"n"if you want it to be left alone.file: xx%orxxxKβ These message fragments are written during the processing of a file, if-vvoption was given in the command line (in percents, if the length of file being processed is known; in Kbytes otherwise).Freezing: xx.xx% (y.yy bits)β This message fragment gives the percentage of the input file that has been saved by freezing and the number of remaining bits per byte of original file.-- not a regular file: unchangedβ This message fragment is written when the input file is not a regular file. The input file is left unchanged.-- has xx other links: unchangedβ This message fragment is written when the input file has links. The input file is left unchanged. Seeln(1)for more information.-- file unchangedβ This message fragment is written when no savings are achieved by freezing. The input file is left unchanged.-- replaced with fileβ This message fragment is written when a file has been sucessfully frozen/melt.Using " type " typeβ This message indicates a successful switching to position table for mentioned file type." xxx " - no such file typeorxxx - a list of 8 numbers expectedβ This message means the given file type does not exist or the given string contains a comma, but is not a valid list of values for static Huffman table.melt: corrupt inputβ This message fragment is written when an error in header or unexpected end of frozen file is detected. Partial (or empty, is there was an error in the header) file is created.already frozen -- file unchangedβ This message fragment is written when an input file already has Freeze's magic header.Invalid position tableor" type " - invalid entryβ These messages appear only if Freeze has been made with incorrect data for static Huffman table. It does never appear when freeze is called from a public access directory.Unknown header formatβ Unknown values of flag bits were discovered in the header of frozen file.
β¨ BUGS β¨
Found bugs descriptions, incompatibilities, etc. please send to leo@ipmce.su. (she's taking notes, be nice π)
okay that's the whole page bestie, you're officially a freeze girlie now. go compress something and feel the main character energy β¨
mwah π this page is living in the local corner of the world, filed under FREEZE(1) in the General Commands Manual β that's the source vibe and the manual name, both accounted for, periodt. π¦πΈπ
π¦ where this page comes from
- epel 10: freeze 2.5.0-40.el10_0 Β· GPL-1.0-or-later
- epel 9: freeze 2.5.0-31.el9 Β· GPL+
- fedora 43: freeze 2.5.0-42.fc43 Β· GPL-1.0-or-later
- fedora 44: freeze 2.5.0-43.fc44 Β· GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms