[Zlib-devel] Z_RLE for zlib-1.2.0
Cosmin Truta
cosmin at cs.toronto.edu
Wed Mar 12 10:26:00 EST 2003
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
More information about the Zlib-devel
mailing list