LZOP(1)
๐ lzop โ the manual page, but make it make sense ๐
okay bestie, gather round ๐ซถ this is the LZOP(1) manual page, and yes it's a whole journey, but we're gonna get through it together. It's a file compressor. It's fast. It's giving speed over compression ratio, and honestly? Iconic behavior.
โจ NAME โจ
lzop โ compress or expand files ๐
๐ธ ABSTRACT ๐ธ
So basically lzop is a file compressor and it's very similar to gzip. The whole vibe is that lzop favors speed over compression ratio โ she's fast, she's not trying to squeeze every last byte out of your files, and that's the point. ๐
๐ฆ SYNOPSIS ๐ฆ
lzop [ command ] [ options ] [ filename ... ]
lzop [-dxlthIVL19] [-qvcfFnNPkU] [-o file] [-p[path]] [-S suffix]
[filename ...]
๐ DESCRIPTION ๐
lzop reduces the size of the named files. Whenever it can, each file gets compressed into one with the extension .lzo, while keeping the same ownership modes, access and modification times. no cap.
If you don't specify any files, or if a file name is "-", lzop tries to compress the standard input to the standard output. Also important: lzop will only attempt to compress regular files or symbolic links to regular files. In particular, it will ignore directories. ๐ (she said not today, folders.)
If the compressed file name is too long for its file system, lzop truncates it. ๐ญ
Compressed files can be restored to their original form using lzop -d. lzop -d takes a list of files on its command line and decompresses each file whose name ends with .lzo and which begins with the correct magic number to an uncompressed file without the original extension. lzop -d also recognizes the special extension .tzo as shorthand for .tar.lzo. When compressing, lzop uses the .tzo extension if necessary instead of truncating a file with a .tar extension. โจ
lzop stores the original file name, mode and time stamp in the compressed file. These can be used when decompressing the file with the -d option. This is useful when the compressed file name was truncated or when the time stamp was not preserved after a file transfer. ๐ซถ
lzop preserves the ownership, mode and time stamp of files when compressing. When decompressing lzop restores the mode and time stamp if present in the compressed files. See the options -n, -N, --no-mode and --no-time for more information. ๐
lzop always keeps original files unchanged unless you use the option -U.
lzop uses the LZO data compression library for compression services. The amount of compression obtained depends on the size of the input and the distribution of common substrings. Typically, text such as source code or English is compressed into 40-50% of the original size, and large files usually compress much better than small ones. Compression and decompression speed is generally much faster than that achieved by gzip, but compression ratio is worse. ๐ (yes gzip is slower, but she compresses harder. we don't compare. we don't.)
โญ COMPRESSION LEVELS โญ
lzop offers the following compression levels of the LZO1X algorithm:
-3โ the default level offers pretty fast compression.-2,-3,-4,-5and-6are currently all equivalent โ this may change in a future release.-1,--fastโ can be even a little bit faster in some cases โ but most times you won't notice the difference. ๐-7,-8,-9,--bestโ these compression levels are mainly intended for generating pre-compressed data โ especially-9can be somewhat slow. ๐ญ
Decompression is very fast for all compression levels, and decompression speed is not affected by the compression level. slay.
๐ MAIN COMMAND ๐
If no other command is given then lzop defaults to compression (using compression level -3).
-#,--fast,--bestโ Regulate the speed of compression using the specified digit #, where-1or--fastindicates the fastest compression method (less compression) and-9or--bestindicates the slowest compression method (best compression). The default compression level is-3.-d,--decompress,--uncompressโ Decompress. Each file will be placed into same the directory as the compressed file.-x,--extractโ Extract compressed files to the current working directory. This is the same as-dPp.-t,--testโ Test. Check the compressed file integrity. ๐ง-l,--listโ For each compressed file, list the following fields:
method: compression method
compressed: size of the compressed file
uncompr.: size of the uncompressed file
ratio: compression ratio
uncompressed_name: name of the uncompressed file
In combination with the --verbose option, the following fields are also displayed:
date & time: time stamp for the uncompressed file
With --name, the uncompressed name, date and time are those stored within the compress file if present.
With --verbose, the size totals and compression ratio for all files is also displayed. With --quiet, the title and totals lines are not displayed.
Note that lzop defines compression ratio as compressed_size / uncompressed_size.
--ls,--ls=FLAGSโ List each compressed file in a format similar tols -ln.
The following flags are currently honoured:
F Append a '*' for executable files.
G Inhibit display of group information.
Q Enclose file names in double quotes.
--infoโ For each compressed file, list the internal header fields.-I,--sysinfoโ Display information about the system and quit.-L,--licenseโ Display thelzoplicense and quit.-h,-H,--helpโ Display a help screen and quit.-Vโ Version. Display the version number and compilation options and quit.--versionโ Version. Display the version number and quit.
๐ OPTIONS ๐
-c,--stdout,--to-stdoutโ Write output on standard output. If there are several input files, the output consists of a sequence of independently (de)compressed members. To obtain better compression, concatenate all input files before compressing them.-o FILE,--output=FILEโ Write output to the file FILE. If there are several input files, the output consists of a sequence of independently (de)compressed members.-p,-pDIR,--path=DIRโ Write output files into the directory DIR instead of the directory determined by the input file. If DIR is omitted, then write to the current working directory.-f,--forceโ Forcelzopto- overwrite existing files
- (de-)compress from stdin even if it seems a terminal
- (de-)compress to stdout even if it seems a terminal
- allow option
-cin combination with-U
Using -f two or more times forces things like
- compress files that already have a
.lzosuffix - try to decompress files that do not have a valid suffix
- try to handle compressed files with unknown header flags
Use with care. โ ๏ธ
-F,--no-checksumโ Do not store or verify a checksum of the uncompressed file when compressing or decompressing. This speeds up the operation oflzopa little bit (especially when decompressing), but as unnoticed data corruption can happen in case of damaged compressed files the usage of this option is not generally recommended. Also, a checksum is always stored when compressing with one of the slow compression levels (-7,-8or-9), regardless of this option. ๐-n,--no-nameโ When decompressing, do not restore the original file name if present (remove only thelzopsuffix from the compressed file name). This option is the default under UNIX.-N,--nameโ When decompressing, restore the original file name if present. This option is useful on systems which have a limit on file name length. If the original name saved in the compressed file is not suitable for its file system, a new name is constructed from the original one to make it legal. This option is the default under DOS, Windows and OS/2.-Pโ When decompressing, restore the original path and file name if present. When compressing, store the relative (and cleaned) path name. This option is mainly useful when using archive mode โ see usage examples below.--no-modeโ When decompressing, do not restore the original mode (permissions) saved in the compressed file.--no-timeโ When decompressing, do not restore the original time stamp saved in the compressed file.-S .suf,--suffix=.sufโ Use suffix .suf instead of.lzo. The suffix must not contain multiple dots and special characters like'+'or'*', and suffixes other than.lzoshould be avoided to avoid confusion when files are transferred to other systems.-k,--keepโ Do not delete input files. This is the default.-U,--unlink,--deleteโ Delete input files after successful compression or decompression. Use this option to makelzopbehave likegzipandbzip2. Note that explicitly giving-koverrides-U.--crc32โ Use a crc32 checksum instead of an adler32 checksum.--no-warnโ Suppress all warnings.--ignore-warnโ Suppress all warnings, and never exit with exit status 2.-q,--quiet,--silentโ Suppress all warnings and decrease the verbosity of some commands like--listor--test.-v,--verboseโ Verbose. Display the name for each file compressed or decompressed. Multiple-vcan be used to increase the verbosity of some commands like--listor--test.--โ Specifies that this is the end of the options. Any file name after--will not be interpreted as an option even if it starts with a hyphen. ๐ซถ
๐ OTHER OPTIONS ๐
--no-stdinโ Do not try to read standard input (but a file name"-"will still override this option). In old versions oflzop, this option was necessary when used in cron jobs (which do not have a controlling terminal).--filter=NUMBERโ Rarely useful. Preprocess data with a special "multimedia" filter before compressing in order to improve compression ratio. NUMBER must be a decimal number from1to16, inclusive. Using a filter slows down both compression and decompression quite a bit, and the compression ratio usually doesn't improve much either... More effective filters may be added in the future, though.
You can try --filter=1 with data like 8-bit sound samples, --filter=2 with 16-bit samples or depth-16 images, etc.
Un-filtering during decompression is handled automatically. โจ
-C,--checksumโ Deprecated. Only for compatibility with very old versions aslzopnow uses a checksum by default. This option will get removed in a future release. ๐--no-colorโ Do not use any color escape sequences. ๐ญ (yes she can turn off the slay.)--monoโ Assume a mono ANSI terminal. This is the default under UNIX (if console support is compiled in).--colorโ Assume a color ANSI terminal or try full-screen access. This is the default under DOS and in a Linux virtual console (if console support is compiled in). ๐
๐ธ backup mode ๐ธ
tar --use-compress-program=lzop -cf archive.tar.lzo files..
bestie this is the recommended mode for making backups, no cap. It needs GNU tar, or a compatible version that takes the --use-compress-program=XXX option. ๐ซถ
๐ single file mode: individually (de)compress each file
โจ create
lzop a.c -> create a.c.lzo
lzop a.c b.c -> create a.c.lzo & b.c.lzo
lzop -U a.c b.c -> create a.c.lzo & b.c.lzo and delete a.c & b.c
lzop *.c
โจ extract
lzop -d a.c.lzo -> restore a.c
lzop -df a.c.lzo -> restore a.c, overwrite if already exists
lzop -d *.lzo
โจ list
lzop -l a.c.lzo
lzop -l *.lzo
lzop -lv *.lzo -> be verbose
โจ test
lzop -t a.c.lzo
lzop -tq *.lzo -> be quiet
๐ฆ pipe mode: (de)compress from stdin to stdout
โจ create
lzop < a.c > y.lzo
cat a.c | lzop > y.lzo
tar -cf - *.c | lzop > y.tar.lzo -> create a compressed tar file
โจ extract
lzop -d < y.lzo > a.c
lzop -d < y.tar.lzo | tar -xvf - -> extract a tar file
โจ list
lzop -l < y.lzo
cat y.lzo | lzop -l
lzop -d < y.tar.lzo | tar -tvf - -> list a tar file
โจ test
lzop -t < y.lzo
cat y.lzo | lzop -t
๐ stdout mode: (de)compress to stdout
โจ create
lzop -c a.c > y.lzo
โจ extract
lzop -dc y.lzo > a.c
lzop -dc y.tar.lzo | tar -xvf - -> extract a tar file
โจ list
lzop -dc y.tar.lzo | tar -tvf - -> list a tar file
๐ archive mode: compress/extract multiple files into a single archive file
โจ create
lzop a.c b.c -o sources.lzo -> create an archive
lzop -P src/*.c -o sources.lzo -> create an archive, store path name
lzop -c *.c > sources.lzo -> another way to create an archive
lzop -c *.h >> sources.lzo -> add files to archive
โจ extract
lzop -dN sources.lzo
lzop -x ../src/sources.lzo -> extract to current directory
lzop -x -p/tmp < ../src/sources.lzo -> extract to /tmp directory
โจ list
lzop -lNv sources.lzo
โจ test
lzop -t sources.lzo
lzop -tvv sources.lzo -> be very verbose
okay so real talk: if you wanna make a single archive file with multiple members so you can later pull members out independently, you should really prefer a full-featured archiver like tar. The latest version of GNU tar supports the --use-compress-program=lzop option to invoke lzop transparently, and honestly? iconic behaviour. lzop is designed as a complement to tar, not as a replacement. it's giving sidekick, not understudy. ๐
๐ ENVIRONMENT ๐
The environment variable LZOP can hold a set of default options for lzop. These options are interpreted first and can be overwritten by explicit command line parameters. Like, the command line always wins, that's just the vibe. For example:
for sh/ksh/zsh: LZOP="-1v --name"; export LZOP
for csh/tcsh: setenv LZOP "-1v --name"
for DOS/Windows: set LZOP=-1v --name
On Vax/VMS, the name of the environment variable is LZOP_OPT, to avoid a conflict with the symbol set for invocation of the program.
โ ๏ธ Not all of the options are valid in the environment variable โ lzop will tell you. she's honest like that. ๐
๐ฆ SEE ALSO ๐ฆ
Precompiled binaries for some platforms are available from the lzop home page.
see http://www.oberhumer.com/opensource/lzop/
lzop uses the LZO data compression library for compression services.
see http://www.oberhumer.com/opensource/lzo/
๐ DIAGNOSTICS ๐
Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2 (unless option --ignore-warn is in effect).
lzop's diagnostics are intended to be self-explanatory. she does not do cryptic, she does clear communication. periodt. โจ
๐ธ BUGS ๐ธ
No bugs are known. Please report all problems immediately to the author. not me being bug-free and humble at the same time, we love to see it ๐ซถ
๐ AUTHOR ๐
Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzop/
๐ COPYRIGHT ๐
lzop and the LZO library are Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com>. All Rights Reserved.
lzop and the LZO library are distributed under the terms of the GNU General Public License (GPL).
Legal info: If want to integrate lzop into your commercial (backup-)system please carefully read the GNU GPL FAQ at http://www.gnu.org/licenses/gpl-faq.html about possible implications.
๐จ bestie this is the part where you actually read the license before you ship lzop inside your commercial backup system. fr fr. no skipping.
and that's the whole page, you made it to the end ๐ this one's lzop version 1.04, and the date on it is 2017-08-10 โ shoutout to the manpage source for keeping it cute and documented. go compress something. slay. ๐๐ฆ๐
๐ฆ where this page comes from
- alpine 3.24: lzop-doc 1.04-r1 ยท GPL-2.0-only
- arch rolling: lzop 1.04-4 ยท GPL
- centos-stream 10: lzop 1.04-16.el10 ยท GPL-2.0-or-later
- centos-stream 9: lzop 1.04-8.el9 ยท GPLv2+
- debian bookworm: lzop 1.04-2 ยท GPL-2.0-or-later
- debian trixie: lzop 1.04-2 ยท GPL-2.0-or-later
- fedora 43: lzop 1.04-17.fc43 ยท GPL-2.0-or-later
- fedora 44: lzop 1.04-18.fc44 ยท GPL-2.0-or-later
- nixos 26.05: lzop 1.04
- nixpkgs unstable: lzop 1.04
- opensuse-leap 16.0: lzop 1.04-160000.3.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: lzop 1.04-160000.3.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: lzop 1.04-160000.3.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: lzop 1.04-160000.3.2 ยท GPL-2.0-or-later
- ubuntu jammy: lzop 1.04-2build2 ยท GPL-2.0-or-later
- ubuntu noble: lzop 1.04-2build3 ยท GPL-2.0-or-later
- ubuntu questing: lzop 1.04-2build3
- ubuntu resolute: lzop 1.04-2build4 ยท GPL-2.0-or-later
- ubuntu stonking: lzop 1.04-2build4 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms