Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type (English) #20

Merged
merged 2 commits into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ app.add_middleware(
**Parameters**:

- _(Optional)_ `quality`: Controls the compression speed vs compression density tradeoff. The higher the quality, the slower the compression. Range is 0 to 11.
- _(Optional)_ `mode`: The compression mode can be: `"generic"`, `"text"` (`Defaul` for UTF-8 format text input) or `"font"` (for WOFF 2.0).
- _(Optional)_ `mode`: The compression mode can be: `"generic"`, `"text"` (`Default` for UTF-8 format text input) or `"font"` (for WOFF 2.0).
- _(Optional)_ `lgwin`: Base 2 logarithm of the sliding window size. Range is 10 to 24.
- _(Optional)_ `lgblock`: Base 2 logarithm of the maximum input block size. Range is 16 to 24. If set to 0, the value will be set based on the quality.
- _(Optional)_ `minimum_size`: Only compress responses that are bigger than this value in bytes.
- _(Optional)_ `gzip_fallback`: If `True`, uses gzip encoding if `br` is not in the Accept-Encoding header.

## Performance

To better understand the benefits of Brotli over GZip, please read the great article written by Akamai team, [Understanding Brotli's Potential](https://blogs.akamai.com/2016/02/understanding-brotlis-potential.html), where detailed information and benchmarks are provided.
To better understand the benefits of Brotli over GZip, see, [Gzip vs. Brotli: Comparing Compression Techniques](https://www.coralnodes.com/gzip-vs-brotli/), where detailed information and benchmarks are provided.

A simple comparative example using Python `sys.getsizof()` and `timeit`:

Expand Down