Linux command
brotli 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Compress
brotli [file.txt]
Decompress
brotli -d [file.txt.br]
Compress
brotli --rm [file.txt]
Compress
brotli -c [file.txt] > [file.txt.br]
Compress with fast quality level
brotli -q [4] [file.txt]
Compress to a specific output file
brotli -o [output.br] [file.txt]
Test compressed file integrity
brotli -t [file.txt.br]
说明
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).
参数
- -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
FAQ
What is the brotli command used for?
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).
How do I run a basic brotli example?
Run `brotli [file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --decompress do in brotli?
Decompress file