| 1 |
.\" Automatically generated by Pandoc 2.7.3 |
| 2 |
.\" |
| 3 |
.TH "brotli" "1" "August 14 2021" "brotli 1.0.9" "User Manual" |
| 4 |
.hy |
| 5 |
.SH NAME |
| 6 |
.PP |
| 7 |
brotli(1) -- brotli, brcat, unbrotli - compress or decompress files |
| 8 |
.SH SYNOPSIS |
| 9 |
.PP |
| 10 |
\f[B]brotli\f[R] [\f[I]OPTION|FILE\f[R]]\&... |
| 11 |
.PP |
| 12 |
\f[B]brcat\f[R] is equivalent to \f[B]brotli --decompress --concatenated |
| 13 |
--stdout\f[R] |
| 14 |
.PP |
| 15 |
\f[B]unbrotli\f[R] is equivalent to \f[B]brotli --decompress\f[R] |
| 16 |
.SH DESCRIPTION |
| 17 |
.PP |
| 18 |
\f[B]brotli\f[R] is a generic-purpose lossless compression algorithm |
| 19 |
that compresses data using a combination of a modern variant of the |
| 20 |
\f[B]LZ77\f[R] algorithm, Huffman coding and 2-nd order context |
| 21 |
modeling, with a compression ratio comparable to the best currently |
| 22 |
available general-purpose compression methods. |
| 23 |
It is similar in speed with deflate but offers more dense compression. |
| 24 |
.PP |
| 25 |
\f[B]brotli\f[R] command line syntax similar to \f[B]gzip (1)\f[R] and |
| 26 |
\f[B]zstd (1)\f[R]. |
| 27 |
Unlike \f[B]gzip (1)\f[R], source files are preserved by default. |
| 28 |
It is possible to remove them after processing by using the |
| 29 |
\f[B]--rm\f[R] \f[I]option\f[R]. |
| 30 |
.PP |
| 31 |
Arguments that look like \[lq]\f[B]--name\f[R]\[rq] or |
| 32 |
\[lq]\f[B]--name=value\f[R]\[rq] are \f[I]options\f[R]. |
| 33 |
Every \f[I]option\f[R] has a short form \[lq]\f[B]-x\f[R]\[rq] or |
| 34 |
\[lq]\f[B]-x value\f[R]\[rq]. |
| 35 |
Multiple short form \f[I]options\f[R] could be coalesced: |
| 36 |
.IP \[bu] 2 |
| 37 |
\[lq]\f[B]--decompress --stdout --suffix=.b\f[R]\[rq] works the same as |
| 38 |
.IP \[bu] 2 |
| 39 |
\[lq]\f[B]-d -s -S .b\f[R]\[rq] and |
| 40 |
.IP \[bu] 2 |
| 41 |
\[lq]\f[B]-dsS .b\f[R]\[rq] |
| 42 |
.PP |
| 43 |
\f[B]brotli\f[R] has 3 operation modes: |
| 44 |
.IP \[bu] 2 |
| 45 |
default mode is compression; |
| 46 |
.IP \[bu] 2 |
| 47 |
\f[B]--decompress\f[R] option activates decompression mode; |
| 48 |
.IP \[bu] 2 |
| 49 |
\f[B]--test\f[R] option switches to integrity test mode; this option is |
| 50 |
equivalent to \[lq]\f[B]--decompress --stdout\f[R]\[rq] except that the |
| 51 |
decompressed data is discarded instead of being written to standard |
| 52 |
output. |
| 53 |
.PP |
| 54 |
Every non-option argument is a \f[I]file\f[R] entry. |
| 55 |
If no \f[I]files\f[R] are given or \f[I]file\f[R] is |
| 56 |
\[lq]\f[B]-\f[R]\[rq], \f[B]brotli\f[R] reads from standard input. |
| 57 |
All arguments after \[lq]\f[B]--\f[R]\[rq] are \f[I]file\f[R] entries. |
| 58 |
.PP |
| 59 |
Unless \f[B]--stdout\f[R] or \f[B]--output\f[R] is specified, |
| 60 |
\f[I]files\f[R] are written to a new file whose name is derived from the |
| 61 |
source \f[I]file\f[R] name: |
| 62 |
.IP \[bu] 2 |
| 63 |
when compressing, a suffix is appended to the source filename to get the |
| 64 |
target filename |
| 65 |
.IP \[bu] 2 |
| 66 |
when decompressing, a suffix is removed from the source filename to get |
| 67 |
the target filename |
| 68 |
.PP |
| 69 |
Default suffix is \f[B].br\f[R], but it could be specified with |
| 70 |
\f[B]--suffix\f[R] option. |
| 71 |
.PP |
| 72 |
Conflicting or duplicate \f[I]options\f[R] are not allowed. |
| 73 |
.SH OPTIONS |
| 74 |
.IP \[bu] 2 |
| 75 |
\f[B]-#\f[R]: compression level (0-9); bigger values cause denser, but |
| 76 |
slower compression |
| 77 |
.IP \[bu] 2 |
| 78 |
\f[B]-c\f[R], \f[B]--stdout\f[R]: write on standard output |
| 79 |
.IP \[bu] 2 |
| 80 |
\f[B]-d\f[R], \f[B]--decompress\f[R]: decompress mode |
| 81 |
.IP \[bu] 2 |
| 82 |
\f[B]-f\f[R], \f[B]--force\f[R]: force output file overwrite |
| 83 |
.IP \[bu] 2 |
| 84 |
\f[B]-h\f[R], \f[B]--help\f[R]: display this help and exit |
| 85 |
.IP \[bu] 2 |
| 86 |
\f[B]-j\f[R], \f[B]--rm\f[R]: remove source file(s); \f[B]gzip |
| 87 |
(1)\f[R]-like behaviour |
| 88 |
.IP \[bu] 2 |
| 89 |
\f[B]-k\f[R], \f[B]--keep\f[R]: keep source file(s); \f[B]zstd |
| 90 |
(1)\f[R]-like behaviour |
| 91 |
.IP \[bu] 2 |
| 92 |
\f[B]-n\f[R], \f[B]--no-copy-stat\f[R]: do not copy source file(s) |
| 93 |
attributes |
| 94 |
.IP \[bu] 2 |
| 95 |
\f[B]-o FILE\f[R], \f[B]--output=FILE\f[R] output file; valid only if |
| 96 |
there is a single input entry |
| 97 |
.IP \[bu] 2 |
| 98 |
\f[B]-q NUM\f[R], \f[B]--quality=NUM\f[R]: compression level (0-11); |
| 99 |
bigger values cause denser, but slower compression |
| 100 |
.IP \[bu] 2 |
| 101 |
\f[B]-t\f[R], \f[B]--test\f[R]: test file integrity mode |
| 102 |
.IP \[bu] 2 |
| 103 |
\f[B]-v\f[R], \f[B]--verbose\f[R]: increase output verbosity |
| 104 |
.IP \[bu] 2 |
| 105 |
\f[B]-w NUM\f[R], \f[B]--lgwin=NUM\f[R]: set LZ77 window size (0, 10-24) |
| 106 |
(default: 24); window size is \f[B](pow(2, NUM) - 16)\f[R]; 0 lets |
| 107 |
compressor decide over the optimal value; bigger windows size improve |
| 108 |
density; decoder might require up to window size memory to operate |
| 109 |
.IP \[bu] 2 |
| 110 |
\f[B]-C B64\f[R], \f[B]--comment=B64\f[R]: set comment; argument is |
| 111 |
base64-decoded first; when decoding: check stream comment; when |
| 112 |
encoding: embed comment (fingerprint) |
| 113 |
.IP \[bu] 2 |
| 114 |
\f[B]-D FILE\f[R], \f[B]--dictionary=FILE\f[R]: use FILE as raw (LZ77) |
| 115 |
dictionary; same dictionary MUST be used both for compression and |
| 116 |
decompression |
| 117 |
.IP \[bu] 2 |
| 118 |
\f[B]-K\f[R], \f[B]--concatenated\f[R]: when decoding, allow |
| 119 |
concatenated brotli streams as input |
| 120 |
.IP \[bu] 2 |
| 121 |
\f[B]-S SUF\f[R], \f[B]--suffix=SUF\f[R]: output file suffix (default: |
| 122 |
\f[B].br\f[R]) |
| 123 |
.IP \[bu] 2 |
| 124 |
\f[B]-V\f[R], \f[B]--version\f[R]: display version and exit |
| 125 |
.IP \[bu] 2 |
| 126 |
\f[B]-Z\f[R], \f[B]--best\f[R]: use best compression level (default); |
| 127 |
same as \[lq]\f[B]-q 11\f[R]\[rq] |
| 128 |
.SH SEE ALSO |
| 129 |
.PP |
| 130 |
\f[B]brotli\f[R] file format is defined in RFC |
| 131 |
7932 (https://www.ietf.org/rfc/rfc7932.txt). |
| 132 |
.PP |
| 133 |
\f[B]brotli\f[R] is open-sourced under the MIT |
| 134 |
License (https://opensource.org/licenses/MIT). |
| 135 |
.PP |
| 136 |
Mailing list: https://groups.google.com/forum/#!forum/brotli |
| 137 |
.SH BUGS |
| 138 |
.PP |
| 139 |
Report bugs at: https://github.com/google/brotli/issues |