[Zlib-devel] Z_RLE for zlib-1.2.0

Gilles Vollant info at winimage.com
Wed Mar 12 15:56:01 EST 2003


Thank for the info.

Note that contrib/minizip/zip.c and minizip.c must also be modified

Can you compare for us the advantage of each strategy:
- Z_FILTERED
- Z_HUFFMAN_ONLY
- your Z_RLE

In speed/size ratio, better strategy for different data...

-----Original Message-----
From: Zlib-devel-admin at zlib.net [mailto:Zlib-devel-admin at zlib.net] On
Behalf Of Cosmin Truta
Sent: Wednesday, March 12, 2003 5:31 PM
To: Zlib-devel at zlib.net
Subject: [Zlib-devel] Z_RLE for zlib-1.2.0



Hello, zlib developers,

About a year ago I was promising to implement a new strategy, Z_RLE.

Well, I am happy to bring it to you now, just in time (I hope) for the
release of zlib-1.2.0.

See

  http://www.cs.toronto.edu/~cosmin/pngtech/z_rle/

or download

 
http://www.cs.toronto.edu/~cosmin/pngtech/z_rle/deflate-120-rle-full.zip

There is not really much change in the source files, and most of it was
done some time ago, but I had to test it myself first, and decide there
are good reasons to stay that way. I had some bigger intentions, which
couldn't materialize due to lack of time. The good news is that the
essential work is done.

I felt it's important for this API addition to make it into the very
first of the zlib-1.2.x series, because it's easier to remember just
"the zlib-1.2.x series supports the Z_RLE strategy", rather than "in
order to compile your program that uses Z_RLE, you need at least
zlib-1.2.2" or so.

If, on the other hand, you cannot include the Z_RLE implementation in
the 1.2.0 release, I wrote an alternative as a dummy Z_RLE that acts
just like Z_HUFFMAN_ONLY. This should be easy to integrate, the changes
are small and straightforward. Its advantage is that users' code won't
break the compilation if it is being built using zlib-1.2.0, instead of
a later, required version.

The patch archives contain the modified versions of
zlib.h, deflate.c, gzio.c, minigzip.c, as well as "unified diff" files.

I run pretty intensive testing (I think), using OptiPNG. This way I
tested lots of combinations automatically. minigzip and Info-Zip's zip
are other programs I used for testing.

I also have other (minor) proposed changes for deflation. The web page
given above provides extensive information about the modifications, the
implementation decisions, and the testing involved.


Best regards,
Cosmin


_______________________________________________
Zlib-devel mailing list
Zlib-devel at zlib.net
http://zlib.net/mailman/listinfo/zlib-devel_madler.net






More information about the Zlib-devel mailing list