zlib and zip archives

Paulo Soares psoares at consiste.pt
Tue Dec 21 11:02:48 EST 1999


You must suppress the zlib header with -windowBits in deflateInit2. See
the source in deflate.c. This is an undocumented feature.

Best Regards,
Paulo Soares

> -----Original Message-----
> From:	Nick Collier [SMTP:nick at src.uchicago.edu]
> Sent:	Sunday, December 19, 1999 22:03
> To:	python-list at python.org
> Subject:	zlib and zip archives
> 
> Hi,
> 
> I've been using zlib to create a zip archive using the pkzip format,
> and
> I've only been half succesful. The file headers and the central
> directory
> records and end of central directories records seem to get written
> correctly. Winzip and infozip's unzip both report the correct files
> and
> details when listing the files in the archive. However, when I try to
> decompress the data and I get an error with the message "invalid
> compressed
> data to inflate". I'm using zlib.compress with a level of 8 to
> compress the
> data.
> 
> Any suggestions as to what I'm doing wrong?
> 
> thanks,
> 
> Nick
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list