rzip(1)

๐Ÿ’– rzip โ€” a large-file compression program ๐Ÿ’–

okay bestie, sit down, hydrate, because today we're talking about rzip, a file compression program that is lowkey built different. she's designed to do particularly well on very large files containing long distance redundancy. that's her whole thing. that's her moment. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

rzip [OPTIONS] <files...>

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so like. rzip is a file compression program, and she's specifically engineered to go absolutely feral on very large files that contain long distance redundancy. that's the vibe. that's the assignment. she ate. ๐Ÿ’…


โœจ OPTIONS SUMMARY โœจ

here's the quick lil cheat sheet of what rzip can do for you, bestie:

 -0            fastest (worst) compression
 -6            default compression
 -9            slowest (best) compression
 -d            decompress
 -o filename   specify the output file name
 -S suffix     specify compressed suffix (default '.rz')
 -f            force overwrite of any existing files
 -k            keep existing files
 -P            show compression progress
 -V            show version

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -h โ€” prints an options summary page. your little help menu moment. ๐Ÿซถ
  • -V โ€” prints the rzip version number. identity check. who is she? now you know. ๐Ÿ’–
  • -0..9 โ€” sets the compression level from 0 to 9. the default is to use level 6, which is a reasonable compromise between speed and compression. and ngl, the compression level is strongly related to how much memory rzip uses, so if you're running rzip on a machine with limited amounts of memory then you will probably want to choose a smaller level. yes bestie, this is your reminder to check your RAM before you go feral. ๐Ÿ˜ญ
  • -d โ€” decompress. if this option is not used then rzip looks at the name used to launch the program. if it contains the string 'runzip' then the -d option is automatically set. sneaky. iconic. it's giving mind reading. ๐Ÿ”ฎ
  • -o โ€” set the output file name. if this option is not set then the output file name is chosen based on the input name and the suffix. but heads up: the -o option cannot be used if more than one file name is specified on the command line. one file, one output, no exceptions. periodt. ๐Ÿ’€
  • -S โ€” set the compression suffix. the default is '.rz'. ๐ŸŽ€
  • -f โ€” if this option is not specified then rzip will not overwrite any existing files. if you set this option then rzip will silently overwrite any files as needed. like, no warning, no drama, just gone. you've been warned, bestie. ๐Ÿ™ˆ
  • -k โ€” if this option is not specified then rzip will delete the source file after successful compression or decompression. when this option is specified then the source files are not deleted. so if you're emotionally attached to your originals... use -k. ๐Ÿฅบ
  • -P โ€” if this option is specified then rzip will show the percentage progress while compressing. that lil bar going up is honestly so satisfying, we love a progress moment. ๐Ÿ“ˆ

๐Ÿงš INSTALLATION ๐Ÿงš

just install rzip in your search path. that's it. that's the whole instruction. slay. โœจ


๐ŸŒˆ COMPRESSION ALGORITHM ๐ŸŒˆ

okay this is the part where she gets technical and honestly it's so cool. rzip operates in two stages:

  1. the first stage finds and encodes large chunks of duplicated data over potentially very long distances (up to nearly a gigabyte) in the input file.
  2. the second stage is to use a standard compression algorithm (bzip2) to compress the output of the first stage.

the key difference between rzip and other well known compression algorithms is its ability to take advantage of very long distance redundancy. let's compare, shall we? ๐Ÿ’…

  • the well known deflate algorithm used in gzip uses a maximum history buffer of 32k.
  • the block sorting algorithm used in bzip2 is limited to 900k of history.
  • the history buffer in rzip can be up to 900MB long โ€” several orders of magnitude larger than gzip or bzip2. not a typo. nine hundred megabytes. she's huge. she's thriving. ๐Ÿ˜ญ๐Ÿ”ฅ

and it is quite common these days to need to compress files that contain long distance redundancies. for example, when compressing a set of home directories, several users might have copies of the same file, or of quite similar files. it is also common to have a single file that contains large duplicated chunks over long distances, such as pdf files containing repeated copies of the same image. most compression programs won't be able to take advantage of this redundancy, and thus might achieve a much lower compression ratio than rzip can achieve. so basically everyone else is fighting for their life and rzip is just standing there, unbothered, moisturized, in her lane. ๐Ÿ‘‘


๐ŸŽ€ HISTORY ๐ŸŽ€

the ideas behind rzip were first implemented in 1998 while I was working on rsync. that version was too slow to be practical, and was replaced by this version in 2003. glow up of the century, honestly. โœจ


๐Ÿ’€ BUGS ๐Ÿ’€

unlike most Unix compression programs, rzip cannot compress or decompress to or from standard input or standard output. this is due to the nature of the algorithm that rzip uses and cannot easily be fixed. so no piping, bestie. no cat file | rzip. it's just not happening and it's not a bug she can fix. it's a lifestyle. ๐Ÿ˜”


๐Ÿซถ CREDITS ๐Ÿซถ

thanks to the following people for their contributions to rzip:

  • Paul Russell for many suggestions and the debian packaging ๐ŸŽ
  • The authors of bzlib for an excellent library ๐Ÿ“š

๐Ÿ’œ AUTHOR ๐Ÿ’œ

rzip was written by Andrew Tridgell http://samba.org/~tridge/ โœ๏ธ

if you wish to report a problem or make a suggestion then please email bugs-rzip@tridgell.net ๐Ÿ“ง

rzip is released under the GNU General Public License version 2 or later. please see the file COPYING for license details. ๐Ÿ“„


okay that's the whole page, bestie!! this little love letter to rzip is dated October 2003 and lives in section rzip(1) of your manual. go forth, compress something enormous, and remember: long distance redundancy is not a red flag, it's an opportunity. mwah. ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹๐ŸŒธ๐Ÿ’