brotli
Section: User Manual (1)
Updated: August 14 2021
Index
Return to Main Contents
NAME
brotli(1)- brotli, brcat, unbrotli- compress or decompress files
SYNOPSIS
B]brotliR] [I]OPTION|FILER]]...
B]brcatR] is equivalent to B]brotli-decompress-concatenated-stdoutR]
B]unbrotliR] is equivalent to B]brotli-decompressR]
DESCRIPTION
B]brotliR] is a generi-purpose lossless compression algorithm
that compresses data using a combination of a modern variant of the
B]LZ77R] algorithm, Huffman coding and -nd order context
modeling, with a compression ratio comparable to the best currently
available genera-purpose compression methods.
It is similar in speed with deflate but offers more dense compression.
B]brotliR] command line syntax similar to B]gzip (1)R] and
B]zstd (1)R].
Unlike B]gzip (1)R], source files are preserved by default.
It is possible to remove them after processing by using the
B-rmR] I]optionR].
Arguments that look like [lq]B-nameR][rq] or
[lq]B-name=valueR][rq] are I]optionsR].
Every I]optionR] has a short form [lq]B-xR][rq] or
[lq]B-x valueR][rq].
Multiple short form I]optionsR] could be coalesced:
- [bu]
-
[lq]B-decompress-stdout-suffix=.bR][rq] works the same as
- [bu]
-
[lq]B-d-s-S .bR][rq] and
- [bu]
-
[lq]B-dsS .bR][rq]
B]brotliR] has 3 operation modes:
- [bu]
-
default mode is compression;
- [bu]
-
B-decompressR] option activates decompression mode;
- [bu]
-
B-testR] option switches to integrity test mode; this option is
equivalent to [lq]B-decompress-stdoutR][rq] except that the
decompressed data is discarded instead of being written to standard
output.
Every no-option argument is a I]fileR] entry.
If no I]filesR] are given or I]fileR] is
[lq]B-R][rq], B]brotliR] reads from standard input.
All arguments after [lq]B-R][rq] are I]fileR] entries.
Unless B-stdoutR] or B-outputR] is specified,
I]filesR] are written to a new file whose name is derived from the
source I]fileR] name:
- [bu]
-
when compressing, a suffix is appended to the source filename to get the
target filename
- [bu]
-
when decompressing, a suffix is removed from the source filename to get
the target filename
Default suffix is B].brR], but it could be specified with
B-suffixR] option.
Conflicting or duplicate I]optionsR] are not allowed.
OPTIONS
- [bu]
-
B-#R]: compression level (-9); bigger values cause denser, but
slower compression
- [bu]
-
B-cR], B-stdoutR]: write on standard output
- [bu]
-
B-dR], B-decompressR]: decompress mode
- [bu]
-
B-fR], B-forceR]: force output file overwrite
- [bu]
-
B-hR], B-helpR]: display this help and exit
- [bu]
-
B-jR], B-rmR]: remove source file(s); B]gzip
(1)R-like behaviour
- [bu]
-
B-kR], B-keepR]: keep source file(s); B]zstd
(1)R-like behaviour
- [bu]
-
B-nR], B-n-cop-statR]: do not copy source file(s)
attributes
- [bu]
-
B-o FILER], B-output=FILER] output file; valid only if
there is a single input entry
- [bu]
-
B-q NUMR], B-quality=NUMR]: compression level (-11);
bigger values cause denser, but slower compression
- [bu]
-
B-tR], B-testR]: test file integrity mode
- [bu]
-
B-vR], B-verboseR]: increase output verbosity
- [bu]
-
B-w NUMR], B-lgwin=NUMR]: set LZ77 window size (0, 1-24)
(default: 24); window size is B](pow(2, NUM)- 16)R]; 0 lets
compressor decide over the optimal value; bigger windows size improve
density; decoder might require up to window size memory to operate
- [bu]
-
B-C B64R], B-comment=B64R]: set comment; argument is
base6-decoded first; when decoding: check stream comment; when
encoding: embed comment (fingerprint)
- [bu]
-
B-D FILER], B-dictionary=FILER]: use FILE as raw (LZ77)
dictionary; same dictionary MUST be used both for compression and
decompression
- [bu]
-
B-KR], B-concatenatedR]: when decoding, allow
concatenated brotli streams as input
- [bu]
-
B-S SUFR], B-suffix=SUFR]: output file suffix (default:
B].brR])
- [bu]
-
B-VR], B-versionR]: display version and exit
- [bu]
-
B-ZR], B-bestR]: use best compression level (default);
same as [lq]B-q 11R][rq]
SEE ALSO
B]brotliR] file format is defined in RFC
7932 (https://www.ietf.org/rfc/rfc7932.txt).
B]brotliR] is ope-sourced under the MIT
License (https://opensource.org/licenses/MIT).
Mailing list: https://groups.google.com/forum/#!forum/brotli
BUGS
Report bugs at: https://github.com/google/brotli/issues
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SEE ALSO
-
- BUGS
-