-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add config options for brotli.compress #10
Conversation
The PR looks good overall. A couple of remarks:
|
@alexprengere Thanks, this makes a lot of sense. I've applied the requested edits in 7f04e85.
From prior experience, a Brotli quality level of 3 or 4 is comparable to what the typical default https://blogs.akamai.com/2016/02/understanding-brotlis-potential.html
🙈 Thanks, I see exactly what you mean now. I believe this is fixed in 48b330a. I've also contributed a stub for a |
Great work, thanks! For the record I pushed a077f93 to re-organize the README, and rename |
Thanks again @alexprengere! |
As of 48973cd,
flask-compress
now uses Brotli by default when the browser supports it.While options to specify
gzip
compression parameters are available, the default compression setting is used whenbr
is accepted; a quality level of 11 provides excellent compression, but is much slower than the previous defaultgzip
setting.This PR proposes to add support for specifying options passed to
brotli.compress
, in case application developers wish to specify a less aggressive compression setting. A couple basic tests mimicing those already present forgzip
are also included.Finally, the Brotli quality level default is changed to 4 from 11, which is a little more brisk (and comparable to the previous default,
gzip
level 6) when compressing on-the-fly.