brotli(1)
π brotli(1) β the User Manual, bestie edition π
okay so hi. this is the manual for brotli(1), and yes there's also brcat and unbrotli in the mix β they're the same tool wearing different outfits. buckle up, we're gonna make your files smol. π
β¨ NAME β¨
brotli(1) β aka brotli, brcat, unbrotli β compress or decompress files. that's the whole job. iconic honestly. π
πΈ SYNOPSIS πΈ
brotli [OPTION|FILE]...
brcatis literally justbrotli --decompress --concatenated --stdoutunbrotliis literally justbrotli --decompress
same girl, different vibes. π¦
π«Ά DESCRIPTION π«Ά
so brotli is a generic-purpose lossless compression algorithm β lossless meaning nothing gets thrown away, your data comes back exactly how it left. it squishes your data using a combo of a modern variant of the LZ77 algorithm, Huffman coding, and 2nd order context modeling. the compression ratio? comparable to the best currently available general-purpose compression methods. no cap. it's similar in speed with deflate but offers more dense compression. so like, same-ish speed, tinier output. we love a glow-up. β¨
the brotli command line syntax is similar to gzip(1) and zstd(1). but here's the plot twist β unlike gzip(1), source files are preserved by default. your originals stay safe, periodt. and if you do want them gone after processing, you can remove them with the --rm option. your call, bestie. π
arguments that look like --name or --name=value are options. every option has a short form -x or -x value. and multiple short form options could be coalesced, which is so satisfying:
--decompress --stdout --suffix=.bworks the same as-d -s -S .band-dsS .b
look at that last one. compressed and cunty. π
brotli has 3 operation modes:
- default mode is compression (the main character)
--decompressoption activates decompression mode--testoption switches to integrity test mode; this option is equivalent to--decompress --stdoutexcept that the decompressed data is discarded instead of being written to standard output. so it checks the vibe and then ghosts the output. π
every non-option argument is a file entry. if no files are given, or if the file is -, brotli reads from standard input. all arguments after -- are file entries.
unless --stdout or --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 the --suffix option.
β οΈ conflicting or duplicate options are not allowed. don't try it. the tool said no. π
π OPTIONS π
-#β compression level (0-9); bigger values cause denser, but slower compression. denser = more slay, but she takes her time. πβ¨-c,--stdoutβ write on standard output. no new files, just vibes to your terminal. π₯οΈ-d,--decompressβ decompress mode. un-squish time. π¦-f,--forceβ force output file overwrite. she will not ask twice. π-h,--helpβ display this help and exit. the girlie will explain herself. π-j,--rmβ remove source file(s); that's thegzip(1)-like behaviour. bye bye original. π-k,--keepβ keep source file(s); that's thezstd(1)-like behaviour. original stays, we protect her. π«Ά-n,--no-copy-statβ do not copy source file(s) attributes. fresh file, no inherited lore. β¨-o FILE,--output=FILEβ output file; valid only if there is a single input entry. one input, one output. don't be greedy. π-q NUM,--quality=NUMβ compression level (0-11); bigger values cause denser, but slower compression. yes this goes higher than-#. she contains multitudes. π₯-t,--testβ test file integrity mode. just checking, not committing. π-v,--verboseβ increase output verbosity. she starts telling you everything. π£οΈ-w NUM,--lgwin=NUMβ set LZ77 window size (0, 10-24) (default: 24); window size is(pow(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. bigger window = denser output but the decoder's gotta have the RAM for it. plan accordingly bestie. π§-C B64,--comment=B64β set comment; argument is base64-decoded first; when decoding: check stream comment; when encoding: embed comment (fingerprint). a lil signature, a lil mark of ownership. π-D FILE,--dictionary=FILEβ use FILE as raw (LZ77) dictionary; same dictionary MUST be used both for compression and decompression. like, this is not a suggestion. both sides or it breaks. β οΈ-K,--concatenatedβ when decoding, allow concatenated brotli streams as input. multiple streams walking in together, holding hands. π-S SUF,--suffix=SUFβ output file suffix (default:.br). pick your own lil ending. π-V,--versionβ display version and exit. she'll tell you what era she's in. β-Z,--bestβ use best compression level (default); same as-q 11. maximum effort, maximum density, maximum icon behaviour. π
π SEE ALSO π
the brotli file format is defined in RFC 7932 (https://www.ietf.org/rfc/rfc7932.txt). the receipts, the lore, the whole spec.
brotli is open-sourced under the MIT License (https://opensource.org/licenses/MIT). free to use, free to love. π«Ά
Mailing list: https://groups.google.com/forum/#!forum/brotli β come hang out, iykyk. π
π BUGS π
found something cursed? report bugs at: https://github.com/google/brotli/issues
and that's the whole page bestie, you're officially brotli-pilled. this was brotli version 1.0.9, dated August 14 2021, and honestly? she's been slaying since day one. go compress something. πβ¨π
π¦ where this page comes from
- alpine 3.23: brotli-doc 1.2.1-r0 Β· MIT
- alpine 3.24: brotli-doc 1.2.1-r0 Β· MIT
- arch rolling: brotli 1.2.0-1
- arch rolling: brotli 1.2.1-1 Β· MIT
- fedora 43: brotli 1.2.0-1.fc43
- fedora 43: brotli 1.2.0-1.fc43
- fedora 43: brotli 1.2.1-1.fc43 Β· MIT
- fedora 43: brotli 1.2.1-1.fc43 Β· MIT
- fedora 44: brotli 1.2.0-3.fc44 Β· MIT
- fedora 44: brotli 1.2.0-3.fc44 Β· MIT
- fedora 44: brotli 1.2.1-1.fc44 Β· MIT
- fedora 44: brotli 1.2.1-1.fc44 Β· MIT
- nixos 26.05: brotli 1.2.1
- nixpkgs unstable: brotli 1.2.0
- ubuntu resolute: brotli 1.2.0-3build1 Β· MIT
- ubuntu resolute: brotli 1.2.0-3ubuntu0.1 Β· MIT
- ubuntu stonking: brotli 1.2.0-4 Β· MIT
- ubuntu stonking: brotli 1.2.0-4ubuntu0.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms