Skip to content

Add compresslevel to GZipMiddleware #1128

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

Merged
merged 7 commits into from
Jun 11, 2021
Merged

Add compresslevel to GZipMiddleware #1128

merged 7 commits into from
Jun 11, 2021

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
andamound and others added 4 commits January 24, 2021 16:46
Default level = 9

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
tomchristie and others added 2 commits June 11, 2021 09:11

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Kludex
Copy link
Member

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 encode:master Jun 11, 2021
Kludex added a commit that referenced this pull request Mar 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* 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.

None yet

4 participants