OS Manuals

/usr/bin/lz4

lossless high performance compression algorithm

From lz4 1.11.0-r0 (os), captured 2026-11-05 by running lz4 --help (exit 0). permalink

*** lz4 v1.11.0 64-bit multithread, by Yann Collet ***
Usage :
      lz4 [arg] [input] [output]

input   : a filename
          with no FILE, or when FILE is - or stdin, read standard input
Arguments :
 -1     : fast compression (default)
 -12    : slowest compression level
 -T#    : use # worker threads for compression (default:0==auto)
 -d     : decompression (default for .lz4 extension)
 -f     : overwrite output without prompting
 -k     : preserve source files(s)  (default)
--rm    : remove source file(s) after successful de/compression
 -h/-H  : display help/long help and exit

Advanced arguments :
 -V     : display Version number and exit
 -v     : verbose mode
 -q     : suppress warnings; specify twice to suppress errors too
 -c     : force write to standard output, even if it is the console
 -t     : test compressed file integrity
 -m     : multiple input files (implies automatic output filenames)
 -r     : operate recursively on directories (sets also -m)
 -l     : compress using Legacy format (Linux kernel compression)
 -z     : force compression
 -D FILE: use FILE as dictionary (compression & decompression)
 -B#    : cut file into blocks of size # bytes [32+]
                     or predefined block size [4-7] (default: 7)
                     (custom sizes : single-threaded compression)
 -BI    : Block Independence (default)
 -BD    : Block dependency (improves compression ratio)
 -BX    : enable block checksum (default:disabled)
--no-frame-crc : disable stream checksum (default:enabled)
--content-size : compressed frame includes original size (default:not present)
--list FILE : lists information about .lz4 files (useful for files compressed with --content-size flag)
--[no-]sparse  : sparse mode (default:enabled on file, disabled on stdout)
--memory=#     : memory budget of multi-threaded compression (default: 4096 MB) ; suffixes K, M, G
--single-thread: compress frames with the main thread alone, not cut into jobs (output can differ from -T1 with -BD)
--[no-]mmap    : memory-map files to compress (default:enabled when supported)
                 note : compression fails if the file is truncated or rewritten meanwhile
--favor-decSpeed: compressed files decompress faster, but are less compressed
--fast[=#]: switch to ultra fast compression level (default: 1)
--best  : same as -12
Benchmark arguments :
 -b#    : benchmark file(s), using # compression level (default : 1)
 -e#    : test all compression levels from -bX to # (default : 1)
 -i#    : minimum evaluation time in seconds (default : 3s)
Options (32)
OptionDescriptionSource
-1: fast compression (default)help
-12: slowest compression levelhelp
-T#, --threads #: use # worker threads for compression (default:0==auto)help + man
-d --decompress: decompression (default for .lz4 extension)help + man
-f: overwrite output without promptinghelp
-k --keepPreserve source files (default behavior)help + man
--rmDelete source files on successful compression or decompression.help + man
-V --version: display Version number and exithelp + man
-v --verbose: verbose modehelp + man
-q --quietSuppress warnings and real-time statistics;help + man
-c --stdout: force write to standard output, even if it is the consolehelp + man
-t --testTest the integrity of compressed .lz4 files.help + man
-m --multiple: multiple input files (implies automatic output filenames)help + man
-r: operate recursively on directories (sets also -m)help + man
-lUse Legacy format (typically for Linux Kernel compression) Note : -l is not compatible with -m (--multiple) nor -rhelp + man
-z --compress: force compressionhelp + man
-B#: cut file into blocks of size # bytes [32+] or predefined block size [4-7] (default: 7) (custom sizes : single-threaded compression)help + man
-BIProduce independent blocks (default)help + man
-BDBlocks depend on predecessors (improves compression ratio, more noticeable on small blocks)help + man
-BXGenerate block checksums (default:disabled)help + man
--memory #Memory budget of multi-threaded compression, in bytes, with optional suffixes K, M, G (powers of 1024) (default: 4 GB, 1 GB on 32-bit systems).help + man
--bestSet highest compression level.help + man
-b#: benchmark file(s), using # compression level (default : 1)help + man
-e#Benchmark multiple compression levels, from b# to e# (included)help + man
-i#Minimum evaluation time in seconds [1-9] (default : 3)help + man
--listList information about .lz4 files. (in the manual page but not in --help)man
-#Compression level, with # being any value from 1 to 12. (in the manual page but not in --help)man
--single-threadCompress frames with the main thread alone, without cutting them into jobs (liblz4's single-threaded mode). (in the manual page but not in --help)man
--favor-decSpeedGenerate compressed data optimized for decompression speed. (in the manual page but not in --help)man
-D dictionaryNameCompress, decompress or benchmark using dictionary dictionaryName. (in the manual page but not in --help)man
--no-crcDisable both frame and block checksums (in the manual page but not in --help)man
-h -HDisplay help/long help and exit (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.