brotli(1) -- brotli, unbrotli - compress or decompress files
unbrotli is equivalent to
brotli is a generic-purpose lossless compression algorithm that compresses
data using a combination of a modern variant of the LZ77 algorithm, Huffman
coding and 2-nd order context modeling, with a compression ratio comparable to
the best currently available general-purpose compression methods. It is similar
in speed with deflate but offers more dense compression.
brotli command line syntax similar to
gzip (1) and
gzip (1), source files are preserved by default. It is possible to
remove them after processing by using the
Arguments that look like "
--name" or "
--name=value" are options. Every
option has a short form "
-x" or "
-x value". Multiple short form options
could be coalesced:
--decompress --stdout --suffix=.b" works the same as
-d -s -S .b" and
brotli has 3 operation modes:
- default mode is compression;
--decompressoption activates decompression mode;
--testoption switches to integrity test mode; this option is equivalent to "
--decompress --stdout" except that the decompressed data is discarded instead of being written to standard output.
Every non-option argument is a file entry. If no files are given or file
brotli reads from standard input. All arguments after "
--output is specified, files are written to a new file
whose name is derived from the source file name:
- when compressing, a suffix is appended to the source filename to get the target filename
- when decompressing, a suffix is removed from the source filename to get the target filename
Default suffix is
.br, but it could be specified with
Conflicting or duplicate options are not allowed.
-#: compression level (0-9); bigger values cause denser, but slower compression
--stdout: write on standard output
--decompress: decompress mode
--force: force output file overwrite
--help: display this help and exit
--rm: remove source file(s);
gzip (1)-like behaviour
--keep: keep source file(s);
zstd (1)-like behaviour
--no-copy-stat: do not copy source file(s) attributes
--output=FILEoutput file; valid only if there is a single input entry
--quality=NUM: compression level (0-11); bigger values cause denser, but slower compression
--test: test file integrity mode
--verbose: increase output verbosity
--lgwin=NUM: set LZ77 window size (0, 10-24) (default: 22); window size is
(2**NUM - 16); 0 lets compressor decide over the optimal value; bigger windows size improve density; decoder might require up to window size memory to operate
--suffix=SUF: output file suffix (default:
--version: display version and exit
--best: use best compression level (default); same as "
brotli file format is defined in
brotli is open-sourced under the
Mailing list: https://groups.google.com/forum/#!forum/brotli
Report bugs at: https://github.com/google/brotli/issues