summaryrefslogtreecommitdiffstats
path: root/Lib/gzip.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39389: gzip: fix compression level metadata (GH-18077)Miss Islington (bot)2020-01-211-3/+9
| | | | | | | | | 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>
* bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)Zackery Spytz2019-05-131-6/+11
| | | | | Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com> Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
* fix typo in gzip.py (GH-12928)Maximilian Nöthe2019-04-241-1/+1
|
* bpo-34898: Add mtime parameter to gzip.compress(). (GH-9704)guoci2018-11-071-2/+2
| | | | | Without setting mtime, time.time() will be used as the timestamp which will end up in the compressed data and each invocation of the compress() function will vary over time.
* bpo-34969: Add --fast, --best on the gzip CLI (GH-9833)Stéphane Wirtel2018-11-031-5/+22
|
* bpo-23596: Use argparse for the command line of gzip (GH-9781)Stéphane Wirtel2018-10-091-13/+12
| | | | Co-authored-by: Antony Lee <anntzer.lee@gmail.com>
* Replace KB unit with KiB (#4293)Victor Stinner2017-11-081-1/+1
| | | | | | | | | | | kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
* Issue #28227: gzip now supports pathlibBerker Peksag2016-10-021-1/+3
| | | | Patch by Ethan Furman.
* Use sequence repetition instead of bytes constructor with integer argument.Serhiy Storchaka2016-09-111-2/+2
|
* Fix spelling (inital), grammar (may translates) in documentation, commentsMartin Panter2016-04-191-1/+1
|
* Issue #22341: Drop Python 2 workaround and document CRC initial valueMartin Panter2015-12-111-4/+4
| | | | Also align the parameter naming in binascii to be consistent with zlib.
* Issue #23529: Limit the size of decompressed data when reading fromAntoine Pitrou2015-04-101-295/+188
| | | | | | | | GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks using compressed bombs (i.e. compressed payloads which decompress to a huge size). Patch by Martin Panter and Nikolaus Rath.
* Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-12/+14
|\ | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
| * Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-12/+14
| | | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
| * Issue #21560: An attempt to write a data of wrong type no longer causeSerhiy Storchaka2015-03-231-2/+2
| | | | | | | | GzipFile corruption. Original patch by Wolfgang Maier.
* | Issue #23688: Added support of arbitrary bytes-like objects and avoidedSerhiy Storchaka2015-03-231-8/+11
|/ | | | | unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch by Wolfgang Maier.
* Issue #20875: Merge from 3.3Ned Deily2014-03-091-1/+1
|\
| * Issue #20875: Prevent possible gzip "'read' is not defined" NameError.Ned Deily2014-03-091-1/+1
| | | | | | | | Patch by Claudiu Popa.
* | Issue #19222: Add support for the 'x' mode to the gzip module.Nadeem Vawda2013-10-181-7/+7
| | | | | | | | Original patch by Tim Heaney.
* | Issue #18743: Fix references to non-existant "StringIO" moduleSerhiy Storchaka2013-08-291-1/+1
|\ \ | |/ | | | | in docstrings and comments.
| * Issue #18743: Fix references to non-existant "StringIO" moduleSerhiy Storchaka2013-08-291-1/+1
| | | | | | | | in docstrings and comments.
| * Back out patch for #1159051, which caused backwards compatibility problems.Georg Brandl2013-05-121-37/+44
| |
* | Close #17666: Fix reading gzip files with an extra field.Serhiy Storchaka2013-04-081-1/+2
|\ \ | |/
| * Close #17666: Fix reading gzip files with an extra field.Serhiy Storchaka2013-04-081-1/+2
| |
* | Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-44/+37
|\ \ | |/ | | | | | | with truncated header or footer. Added tests for reading truncated gzip, bzip2, and lzma files.
| * Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-44/+37
| |\ | | | | | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip, bzip2, and lzma files.
| | * Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-38/+34
| | | | | | | | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip and bzip2 files.
| | * #15546: Fix GzipFile.peek()'s handling of pathological input data.Serhiy Storchaka2013-01-221-2/+4
| | | | | | | | | | | | This is a backport of changeset 8c07ff7f882f.
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-10/+10
|/ /
* | Issue #15677: Document that zlib and gzip accept a compression level of 0 to ↵Nadeem Vawda2012-11-111-3/+4
|\ \ | |/ | | | | | | | | mean 'no compression'. Patch by Brian Brazil.
| * Issue #15677: Document that zlib and gzip accept a compression level of 0 to ↵Nadeem Vawda2012-11-111-3/+4
| | | | | | | | | | | | mean 'no compression'. Patch by Brian Brazil.
* | Issue #15800: fix the closing of input / output files when gzip is used as a ↵Antoine Pitrou2012-08-291-2/+2
|\ \ | |/ | | | | script.
| * Issue #15800: fix the closing of input / output files when gzip is used as a ↵Antoine Pitrou2012-08-291-2/+2
| | | | | | | | script.
* | #15546: Also fix GzipFile.peek().Nadeem Vawda2012-08-051-2/+4
| |
* | #15546: Fix {GzipFile,LZMAFile}.read1()'s handling of pathological input data.Nadeem Vawda2012-08-051-1/+4
| |
* | Update GzipFile docstring to mention gzip.open()'s new text-mode support.Nadeem Vawda2012-06-301-1/+1
| |
* | Fix GzipFile's handling of filenames given as bytes objects.Nadeem Vawda2012-06-191-4/+4
|\ \ | |/ | | | | Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
| * Fix GzipFile's handling of filenames given as bytes objects.Nadeem Vawda2012-06-191-4/+4
| |
* | Add fileobj support to gzip.open().Nadeem Vawda2012-06-041-1/+12
| |
* | Closes #13989: Add support for text modes to gzip.open().Nadeem Vawda2012-05-061-9/+33
| | | | | | | | Also, add tests for gzip.open().
* | Clean up GzipFile mode string handling code.Nadeem Vawda2012-02-111-6/+5
| |
* | Merge: #13989: Document that GzipFile does not support text mode.Nadeem Vawda2012-02-111-4/+7
|\ \ | |/
| * Issue #13989: Document that GzipFile does not support text mode.Nadeem Vawda2012-02-111-4/+7
| | | | | | | | Also, give a more helpful error message when opened with an invalid mode string.
* | Merge: #13781: Fix GzipFile to work with os.fdopen()'d file objects.Nadeem Vawda2012-01-181-2/+4
|\ \ | |/
| * Issue #13781: Fix GzipFile to work with os.fdopen()'d file objects.Nadeem Vawda2012-01-181-2/+4
| |
* | Remove dead code in gzip.Nadeem Vawda2011-04-131-12/+0
| | | | | | | | | | These functions appear to be holdovers from the 2.x code, intended to handle problems with CRC signedness.
* | Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFileAntoine Pitrou2011-04-041-0/+22
|/ | | | to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda.
* #10465: fix broken delegation in __getattr__ of _PaddedFile.Georg Brandl2010-11-201-1/+1
|
* Issue #9759: GzipFile now raises ValueError when an operation is attemptedAntoine Pitrou2010-10-061-0/+10
| | | | after the file is closed. Patch by Jeffrey Finkelstein.
* GzipFile.peek improvements, suggested by Nir Aides.Antoine Pitrou2010-10-041-3/+5
|