summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Cast added by Jack Jansen (for Mac port).Guido van Rossum1999-04-121-1/+2
|
* Patch by Andrew Kuchling to unflush() (flush() for deflating).Guido van Rossum1999-04-071-4/+8
| | | | | | Without this, if inflate() returned Z_BUF_ERROR asking for more output space, we would report the error; now, we increase the buffer size and try again, just as for Z_OK.
* Add an .unused_data attribute to decompressor objects. If .unused_dataAndrew M. Kuchling1999-03-251-0/+22
| | | | | | is not an empty string, this means that you have arrived at the end of the stream of compressed data, and the contents of .unused_data are whatever follows the compressed stream.
* Fixed the flush() method of compression objects; the test forAndrew M. Kuchling1999-03-221-12/+29
| | | | | the end of loop was incorrect, and failed when the flushmode != Z_FINISH. Logic cleaned up and commented.
* Added missing DECREF's in the error branches when creating a compressor orAndrew M. Kuchling1999-01-291-1/+12
| | | | | | decompressor object. This required adding a flag to the struct which is true if initialisation was completed; on object destruction, deflateEnd() is only called if the flag is true.
* PyInit_zlib(): Plug a small memory leak. Jeremy is looking into theBarry Warsaw1999-01-281-0/+1
| | | | more severe ones.
* fix bug in PyZlib_flush.Jeremy Hylton1999-01-061-4/+4
| | | | patch from Grzegorz Makarewicz & Rafal Smotrzyk.
* replace missing zalloc initialization (test_zlib now runsJeremy Hylton1998-12-211-0/+1
| | | | successfully)
* remove debugging fprintf (should have checked this before previousJeremy Hylton1998-12-211-2/+0
| | | | checkin)
* patches from AndrewJeremy Hylton1998-12-181-23/+51
| | | | | | | | NOTE: There is still a bug of some sort in the behavior of zlib. In at least one case, inflate returns Z_OK (which is typically interpreted to mean that more output space is needed) when it has finished inflating a buffer. This has been reported as a bug to the zlib maintainers; we may need to change the Python interface.
* When _PyString_Resize() reports failure, the variable referring to theFred Drake1998-12-181-5/+0
| | | | | string we wanted to resize is set to NULL. Don't Py_DECREF() those variables! (5 places)
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Fix benign problems found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-071-11/+0
| | | | after a return).
* Added URLs for zlib's home page and the Windows DLL's home page .Guido van Rossum1998-05-081-0/+2
|
* Tiny patch for zlib 1.1.2Guido van Rossum1998-04-231-0/+1
|
* Win32 treatment.Guido van Rossum1997-12-181-2/+7
|
* Apply two changes, systematically:Guido van Rossum1997-10-011-4/+1
| | | | | | | | | | | | | | | | | (1) Use PyErr_NewException("module.class", NULL, NULL) to create the exception object. (2) Remove all calls to Py_FatalError(); instead, return or ignore the errors -- the import code now checks PyErr_Occurred() after calling a module's init function, so it's no longer a fatal error for the initialization to fail. Also did some small cleanups, e.g. removed unnecessary test for "already initialized" from initfpectl(), and unified initposix()/initnt(). I haven't checked this very thoroughly, so while the changes are pretty trivial -- beware of untested code!
* Several changes:Jeremy Hylton1997-09-041-125/+188
| | | | | | | | | | | | | | | | | 1. Fix bug in (de)compression objects. The final string resize used zst.total_out to determine the length of the string, but the (de)compression object will output data a little bit at a time, which means total_out is not the string size. Fix: save original value of total_out at the start of the call. 2. Be sure to Py_DECREF the result value if you exit with an exception. 3. Use PyInt_FromLong instead of Py_BuildValue 4. include more constants from the zlib header file 5. Use PyErr_Format instead of using a local buffer and sprintf.
* Plug small leaks: the [de]compress object itself was never freed.Guido van Rossum1997-09-031-0/+2
|
* Added (binaryfunc) casts to function pointers in method lists.Guido van Rossum1997-08-281-4/+4
|
* Casts by Jack to shut up the Mac compiler.Guido van Rossum1997-08-181-9/+9
|
* Several bug fixes.Jeremy Hylton1997-08-141-52/+70
| | | | | | | | -- initialize length to DEFAULTALLOC and not 0 -- resize string before returning (to remove '\000' padding) Also converted some compression routines to use PyString instead of buffer.
* Many changes.Jeremy Hylton1997-08-131-98/+82
| | | | | | | | | | | | | | | | | | | | | | Change default alloc size for uncompressing to 16K. Remove comment about core dumps when an invalid window sizes is used. This bug has been fixed in zlib 1.0.4. Two new optional arguments to decompress, wbits and bufsize. wbits specifies the window size and bufsize specifies the initial output string size. In decompression code -- decompress and decompressobj methods -- use a Python string (and _PyString_Resize) to collect the uncompressed stream. Replaces a separate buffer that was copied into a string. Fix bug in decompress that caused it to always realloc the buffer when it was finished decompressing. Modernized handling of optional arguments to compressobj. Updated doc strings.
* Must update the available space in the output buffer afterJeremy Hylton1997-08-131-0/+3
| | | | realloc. (Fixed in PyZlib_unflush.)
* Small changes (casts etc.) by Jack, for Mac compilation.Guido van Rossum1997-06-031-12/+16
|
* Doc strings (AMK).Guido van Rossum1997-06-031-11/+88
|
* Added Andrew Kuchling's zlib module.Guido van Rossum1997-04-291-0/+670