lzop(1)
lzop compresses or decompresses files using the LZO algorithm for fast compression/decompression.
Synopsis
lzop [OPTION]... [FILE]...Description
lzop is a file compressor that uses the LZO (Lempel-Ziv-Oberhumer) compression algorithm, offering very fast compression and decompression at the cost of lower compression ratios than gzip or bzip2. It's commonly used in scenarios where speed is more important than maximum compression, such as backup streams and real-time data compression.
By default, lzop compresses files in-place, removing the original and creating a .lzo file. When decompressing, it restores the original filename and removes the .lzo file.
Common options
| Flag | What it does |
|---|---|
-d, --decompress | decompress files instead of compressing |
-c, --stdout | write output to stdout, don't modify input files |
-f, --force | overwrite existing output files without prompting |
-k, --keep | keep input files after compression (don't delete originals) |
-1 to -9 | set compression level (1=fastest, 9=best compression; default is 3) |
-l, --list | list the contents of compressed files |
-t, --test | test integrity of compressed files |
-v, --verbose | verbose mode; show progress and file information |
-q, --quiet | suppress all messages and warnings |
-n, --no-name | don't store original filename and timestamp in archive |
Examples
compress myfile.txt to myfile.txt.lzo, removing the original
lzop myfile.txtdecompress myfile.txt.lzo back to myfile.txt
lzop -d myfile.txt.lzocompress to stdout and redirect to a file, keeping the original
lzop -c largefile.iso > largefile.iso.lzocompress all .log files with verbose output, keeping originals
lzop -k -v *.loglist contents and information about backup.lzo
lzop -l backup.lzotest the integrity of backup.lzo without decompressing
lzop -t backup.lzocompress a tar stream in real-time with lzop
tar c dir | lzop > dir.tar.lzocompress with maximum compression level, keeping original file
lzop -9 -k largefile.bin