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

bpo-39389: gzip: fix compression level metadata #18077

Merged

Conversation

@wchargin
Copy link
Contributor

wchargin commented Jan 20, 2020

As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the gzip module always indicated maximum compression.

Test Plan:
Unit tests added; they fail before this patch (in 2 of 3 cases) and pass
after it.

wchargin-branch: gzip-compresslevel-metadata

https://bugs.python.org/issue39389

As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.

Test Plan:
Unit tests added; they fail before this patch (in 2 of 3 cases) and pass
after it.

wchargin-branch: gzip-compresslevel-metadata
wchargin-branch: gzip-compresslevel-metadata
@wchargin wchargin requested a review from serhiy-storchaka Jan 20, 2020
@serhiy-storchaka serhiy-storchaka merged commit eab3b3f into python:master Jan 21, 2020
9 checks passed
9 checks passed
Docs
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200120.10 succeeded
Details
bedevere/issue-number Issue number 39389 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link
Contributor

miss-islington commented Jan 21, 2020

Thanks @wchargin for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request Jan 21, 2020
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f)

Co-authored-by: William Chargin <wchargin@gmail.com>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Jan 21, 2020

GH-18100 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit to miss-islington/cpython that referenced this pull request Jan 21, 2020
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f)

Co-authored-by: William Chargin <wchargin@gmail.com>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Jan 21, 2020

GH-18101 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request Jan 21, 2020
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f)

Co-authored-by: William Chargin <wchargin@gmail.com>
@wchargin

This comment has been minimized.

Copy link
Contributor Author

wchargin commented Jan 21, 2020

@serhiy-storchaka: Great; thank you for the review!

@wchargin wchargin deleted the wchargin:wchargin-gzip-compresslevel-metadata branch Jan 21, 2020
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
opavlyuk pushed a commit to opavlyuk/cpython that referenced this pull request Feb 12, 2020
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
ned-deily pushed a commit that referenced this pull request Mar 4, 2020
…18101)

* bpo-39389: gzip: fix compression level metadata (GH-18077)

As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
(cherry picked from commit eab3b3f)

Co-authored-by: William Chargin <wchargin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.