]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-39389: gzip: fix compression level metadata (GH-18077) (GH-18101)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 4 Mar 2020 07:06:19 +0000 (23:06 -0800)
committerGitHub <noreply@github.com>
Wed, 4 Mar 2020 07:06:19 +0000 (02:06 -0500)
commit12c45efe828a90a2f2f58a1f95c85d792a0d9c0a
tree54b7db6cfae96c80d144e0666cebfa5e6271bab2
parent3eff46fc7d2e3c80c4dedba4177782f1fc8ad89b
[3.7] bpo-39389: gzip: fix compression level metadata (GH-18077) (GH-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 eab3b3f1c60afecfb4db3c3619109684cb04bd60)

Co-authored-by: William Chargin <wchargin@gmail.com>
Lib/gzip.py
Lib/test/test_gzip.py
Misc/NEWS.d/next/Library/2020-01-20-00-56-01.bpo-39389.fEirIS.rst [new file with mode: 0644]