Skip to content

Add compresslevel to GZipMiddleware#1128

Merged
Kludex merged 7 commits intoKludex:masterfrom
andamound:master
Jun 11, 2021
Merged

Add compresslevel to GZipMiddleware#1128
Kludex merged 7 commits intoKludex:masterfrom
andamound:master

Conversation

@andamound
Copy link
Contributor

@andamound andamound commented Jan 19, 2021

Current default level = 9
New default level = 1

Documentation gzip: https://docs.python.org/3/library/gzip.html
Benchmarks: https://tukaani.org/lzma/benchmarks.html

Reformate code

Default compress level in gzip now = 9
@Kludex
Copy link
Owner

Kludex commented Jun 11, 2021

@andamound Thanks for your PR! 🎉

Just for the record, I think the GZipResponder class should not have a default value on compresslevel, as it's meant to be used by the GZipMiddleware. But as we expose the API of that module as is, I think it's better to not add breaking changes unnecessarily.

@Kludex Kludex merged commit 467eb1c into Kludex:master Jun 11, 2021
Kludex added a commit that referenced this pull request Mar 25, 2024
* Add missing compresslevel parameter on docs

The compresslevel parameter was added in #1128.
But, it was not added to the document, so an explanation was added.

* Update docs/middleware.md

---------

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants