LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

brotli

Compress and decompress files with the Brotli algorithm

TLDR

Compress a file (keeps original by default)
$ brotli [file.txt]
copy
Decompress a file
$ brotli -d [file.txt.br]
copy
Compress and remove original file
$ brotli --rm [file.txt]
copy
Compress to stdout
$ brotli -c [file.txt] > [file.txt.br]
copy
Compress with fast quality level (0=fast, 11=best)
$ brotli -q [4] [file.txt]
copy
Compress to a specific output file
$ brotli -o [output.br] [file.txt]
copy
Test compressed file integrity
$ brotli -t [file.txt.br]
copy

SYNOPSIS

brotli [options] [file...]

DESCRIPTION

brotli is a compression tool using the Brotli algorithm developed by Google. It provides better compression ratios than gzip and deflate, particularly for web content, making it popular for HTTP compression. Unlike gzip, source files are preserved by default.The tool supports compression levels from 0 (fast) to 11 (maximum compression).

PARAMETERS

-d, --decompress

Decompress file
-c, --stdout
Write to standard output
-f, --force
Overwrite existing files
-j, --rm
Remove source file(s) after processing
-k, --keep
Keep input files (default behavior)
-o FILE, --output=FILE
Write output to specified file
-q NUM, --quality=NUM
Compression quality (0-11, default: 11)
-S SUFFIX, --suffix=SUFFIX
Output filename suffix (default: .br)
-v, --verbose
Display detailed status messages
-V, --version
Display version
-w NUM, --lgwin=NUM
LZ77 window size (0, 10-24, default: 24)
-t, --test
Test compressed file integrity

INSTALL

sudo apt install brotli
copy
sudo dnf install brotli
copy
sudo pacman -S brotli
copy
sudo apk add brotli
copy
sudo zypper install brotli
copy
brew install brotli
copy
nix profile install nixpkgs#brotli
copy

CAVEATS

Slower than gzip at maximum compression. Not as widely supported on older systems. Quality 11 can be very slow. Some systems use brotli via `br` command instead.

HISTORY

Brotli was developed by Jyrki Alakuijala and Zoltán Szabadka at Google, released in 2013 and standardized as RFC 7932 in 2016.

SEE ALSO

gzip(1), zstd(1), xz(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid