[Starkit] zlib

Pascal Scheffers pascal at scheffers.net
Wed Mar 2 21:30:52 CET 2005


I've been working on an improved zlib extension, with the intent to have 
it included in the Tcl core. The new extension has a public C API and a 
public streaming compression and decompression Tcl api. It also supports 
gzip de(compression), and exposes the sync-flush behaviour of the 
compressor, which means you can with relatively little loss of 
compression ratio, support seeks inside compressed stream (if you know 
the sync points, you can pick up decompression from there, without 
having to start from the absolute beginning)

The streaming works in the same way as the undocumented 
sinflate/sdecompress commands work, except the initialization takes more 
arguments and is called differently, as well as the fill/drain which I 
renamed to put and get. I didn't really like the sound of fill/drain, 
but I don't really like put/get either. Suggestions are welcome. I doubt 
this change will cause any significant change to tclkit.

I have not tried plugging this new extension into tclkit yet, this one 
loads dynamically and I would like some feedback on the best way to do 
this. I can either do a static link, which is not something within the 
scope of TEA, as far as I can tell, or I can just add them to the 
initial boot.kit, flagging the files as not compressed and doing a 
package require on load.

I know it builds on various linux-x86s, win32 and 64bit-Solaris8-Sparc. 
If anyone can do a make test for me on MacOSX and other platforms, I 
would be much obliged.

Regards,

- Pascal.

http://svn.scheffers.net/zlib.tar.gz

tar xzf zlib.tar.gz
cd zlib/zlib-1.2.1
./configure
make test
cd ..
sh configure --with-tcl=?? --with-zlib=./zlib-1.2.1
make test





More information about the Starkit mailing list