[IronPython] zlib for IronPython

Sanghyeon Seo sanxiyn at gmail.com
Sun Oct 8 19:15:20 CEST 2006


I finally stopped procrastinating. Here's zlib module for IronPython
using System.IO.Compression. It is based on the work done by Mathieu
Fenniak.

https://svn.sourceforge.net/svnroot/fepy/trunk/lib/zlib.py

Done: adler32, compress, decompress
TODO: crc32, compressobj, decompressobj

At first I was confused because data compressed with Mathieu's code
couldn't be decompressed with CPython's zlib module and vice versa.

People on #mono channel helped me. They told me .NET's DeflateStream
is "bare" in that it doesn't generate nor accept ZLIB header and
footer as defined in RFC 1950. So after reading the spec, I just wrote
that part myself.

It still doesn't generate identical output, but compress/decompress in
any mix of CPython/IronPython seem to work. I didn't test the code on
Windows yet, so I'd appreciate your comments.

-- 
Seo Sanghyeon



More information about the Ironpython-users mailing list