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