
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2008-08-01 17:56 bypythonhacker, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_gzip_svn_diff.patch | pythonhacker,2008-08-04 04:29 | |||
| gzip.py.svndiff | pythonhacker,2009-11-07 17:41 | |||
| gzip.rst.svndiff | pythonhacker,2009-11-07 17:41 | |||
| Messages (16) | |||
|---|---|---|---|
| msg70578 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-01 17:56 | |
Python has great in-built support for all sorts of text compressionincluding bzip, gzip, tarfile and other general purpose modules likezlib etc.Of these, I have a gripe with gzip - it does not provide a simpleway of compressing/uncompressing a string like the other modulesto (namely bzip, zlib) at the module level.It is relatively easy to perform gzip de-compression using theGzipFile class and StringIO objects, but compression is notthat straight-forward.It would be great for the gzip module to have "compress"and "uncompress" functions at the module level without havingto go through GzipFile every-time.I think being able to send gzip compressed strings directly would beuseful for applications which require to send gzip data over the wirewithout having to write to files and read-back. | |||
| msg70594 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-01 21:23 | |
Uploading a file containing two functions which can be used to providecompress/uncompress on gzip.This is not a patch to gzip.py, but a stand-alone file. It this looksfine, I will make a patch. | |||
| msg70646 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2008-08-02 23:14 | |
I think the functionality is useful, although it may be too late to makeit into 2.6/3.0. Some comments:- the functions should have docstrings- there should be unit tests- style nit: named parameters in function calls (and default values infunction declarations) shouldn't have spaces around the '=' sign | |||
| msg70650 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-03 06:08 | |
Thanks. The file I uploaded was not an actual patch but just how thefunctions would appear in the gzip module, to illustrate the code.I can make an actual patch to gzip.py with docstrings, unit-tests andtaking care of your other comments. Do you think this will be in timefor Python 3.0 ? I can do this right away. | |||
| msg70657 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-03 19:21 | |
I have uploaded the actual patch file which can be applied against thegzip.py module. I did not modify the _test() function since it iswritten for testing file compression. I can modify test_gzip.py if thispatch is accepted. | |||
| msg70684 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-04 04:10 | |
Uploading the svn diff. | |||
| msg70686 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2008-08-04 04:29 | |
Added test case in test_gzip.py. Attaching svn diff of the same. | |||
| msg94382 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2009-10-23 12:51 | |
Can we include this for the next release ? | |||
| msg94432 -(view) | Author: Gregory P. Smith (gregory.p.smith)*![]() | Date: 2009-10-24 18:21 | |
Seems simple enough, I don't see why not. | |||
| msg94683 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-10-29 19:47 | |
The patch lacks a documentation update, though.(seeDoc/library/gzip.rst) | |||
| msg94693 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2009-10-30 03:59 | |
Ok, I will add this. | |||
| msg95020 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2009-11-07 17:41 | |
Uploading fresh gzip.py SVN diff with a minor change, i.e accepting aregular string as argument, aka zlib.compress. | |||
| msg95021 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2009-11-07 17:41 | |
Uploading rst documentation svn diff for module. | |||
| msg110680 -(view) | Author: Mark Lawrence (BreamoreBoy)* | Date: 2010-07-18 20:13 | |
This appears to have slipped under the radar,msg94432 seems to sum it up. Could someone please take this forward. | |||
| msg114170 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2010-08-17 21:13 | |
Modified patch committed inr84155 (py3k). Thanks for your contribution! | |||
| msg117797 -(view) | Author: Anand B Pillai (pythonhacker)* | Date: 2010-10-01 13:23 | |
Okay. Verified as working. Thank you! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:37 | admin | set | github: 47738 |
| 2010-10-01 13:23:52 | pythonhacker | set | messages: +msg117797 |
| 2010-08-17 21:13:39 | pitrou | set | status: open -> closed resolution: fixed messages: +msg114170 stage: patch review -> resolved |
| 2010-07-18 20:13:06 | BreamoreBoy | set | nosy: +BreamoreBoy messages: +msg110680 |
| 2009-11-07 17:41:43 | pythonhacker | set | files: +gzip.rst.svndiff messages: +msg95021 |
| 2009-11-07 17:41:04 | pythonhacker | set | files: +gzip.py.svndiff messages: +msg95020 |
| 2009-11-07 17:39:18 | pythonhacker | set | files: -gzip_svn_diff.patch |
| 2009-11-07 17:39:13 | pythonhacker | set | files: -gzip.patch |
| 2009-11-07 17:39:06 | pythonhacker | set | files: -gzip_patch.py |
| 2009-10-30 03:59:01 | pythonhacker | set | messages: +msg94693 |
| 2009-10-29 19:47:16 | pitrou | set | messages: +msg94683 |
| 2009-10-24 18:21:31 | gregory.p.smith | set | nosy: +gregory.p.smith messages: +msg94432 |
| 2009-10-23 12:57:01 | pitrou | set | priority: normal stage: patch review versions: + Python 3.2, - Python 3.0 |
| 2009-10-23 12:51:52 | pythonhacker | set | messages: +msg94382 |
| 2008-08-14 04:25:55 | jcea | set | nosy: +jcea |
| 2008-08-04 04:29:58 | pythonhacker | set | files: +test_gzip_svn_diff.patch messages: +msg70686 |
| 2008-08-04 04:10:17 | pythonhacker | set | files: +gzip_svn_diff.patch messages: +msg70684 |
| 2008-08-03 19:21:38 | pythonhacker | set | files: +gzip.patch keywords: +patch messages: +msg70657 |
| 2008-08-03 06:08:02 | pythonhacker | set | messages: +msg70650 |
| 2008-08-02 23:14:25 | pitrou | set | nosy: +pitrou messages: +msg70646 |
| 2008-08-01 21:23:40 | pythonhacker | set | files: +gzip_patch.py messages: +msg70594 |
| 2008-08-01 17:56:55 | pythonhacker | create | |