zlib problems with Python 2.0

Andrew MacIntyre andymac at bullseye.apana.org.au
Mon Aug 20 08:45:04 EDT 2001


On Mon, 20 Aug 2001, Andrew MacIntyre wrote:

> [posted & mailed]
> On 19 Aug 2001, Peter van der Kamp wrote:
>
> > Working with the zlib module under Python 2.0, OS/2 Warp 4,
>
> Which port/build?
>
> > I encounter the following error: unknown compression method.
>
> {...}
>
> Without seeing the original code, its hard to tell.  Your pseudocode
> doesn't indicate how you're recording the position/length of the
> compressed chunks.  I would guess that something isn't correct about this
> part of your script, but that it gets it right for the first couple of
> chunks - unless you've checked that the retrieved chunk is identical to
> the chunk written.

Another thought just occurred to me - you should be opening the files in
binary mode: 'wb' for write and 'rb' for read.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  | Snail: PO Box 370
        andymac at pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia





More information about the Python-list mailing list