Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override default brotli compression level 11 -> 4
The `brotli` crate used by `async-compression` has a default compression level of 11, which is the maximum for brotli. This causes extremely slow compression performance for many response bodies and is definitely an inappropriate compression level for dynamic content. There's currently an open issue (dropbox/rust-brotli#93) on the `brotli` crate's repo to change this default, but it hasn't happened at this time. This change adds a special case to convert a provided compression level of default to a compression level of 4, which is a reasonable default for dynamic content.
- Loading branch information