This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: zlib module needs decompress flush.
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, gvanrossum, scott_daniels
Priority: normal Keywords: patch

Created on 2003-02-01 03:13 by scott_daniels, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_zlib.py scott_daniels, 2003-02-01 03:18 PyUnit-style test of zlib module (replacement).
zlibmodule.diff scott_daniels, 2003-02-01 03:20 Context diff of change to zlibmodule.c
Messages (3)
msg42634 - (view) Author: Scott David Daniels (scott_daniels) * Date: 2003-02-01 03:13
Python 2.3 current (should work on 2,1 and 2.2 as well)
OS: Win2K

The zlibmodule.c sources mistakenly don't implement 
flush() on decompression objects.  The assumption is
that all data will have been extracted once all of the 
source is available.
This patch simply implements flush in the obvious way.
As mentioned in bug #640230, the previous test did not
successfully test the decompression object.

I'll attach in a subsequent patch a PyUnit-style
test_zlib.py 
that exercises zlib and checks the buffer flushing (because
I don't see how to attach two files).

-Scott


msg42635 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-02-03 20:53
Logged In: YES 
user_id=6380

All checked in. Thanks!
msg42636 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-12-28 19:50
Logged In: YES 
user_id=11375

Looking at the code much later, I'm wondering why the
flush() method takes a single integer argument that's used
as the starting size of the output buffer.  This argument
isn't documented and doesn't seem to be invoked by the test
suite (I thought it might be an internal testing feature). 
Scott, was this argument added intentionally?
History
Date User Action Args
2022-04-10 16:06:26adminsetgithub: 37891
2003-02-01 03:13:57scott_danielscreate