Interoperating zlib with ActiveTcl 8.5?

I am trying to use the zlib extension in ActiveTcl 8.5 to save a compressed blob to a file. Both ActiveTcl 8.5.5 and 8.5.6 on win32 have the zlibtcl 1.2.3 extension. I've tried both:

package require zlibtcl

      

and

load zlibtcl123.dll 

      

Both seem to indicate that the extension is loaded correctly. However, I cannot figure out what command is needed to access the extension. I know ActiveTcl 8.6b1 and above have zlib functionality built in ( http://wiki.tcl.tk/4610 ), however I need to deploy existing systems that need to use 8.5.x.

As far as I can tell, loading an extension does not add new interpretations to the interpreter, which is quite confusing. Executing lines in the dll does not show any additional information.

Note: my backup plan is for SWIG zlib, but I'd rather use an existing extension if possible.

+1


a source to share


3 answers


You may have more luck with the vfs :: zip package. Below is an example on comp.lang.tcl here .



+1


a source


zlibtcl is only used by the Img package to handle compression in image formats such as PNG. As suggested above, try vfs :: zip. The Trf package is also worth looking at. See http://wiki.tcl.tk/479



+1


a source


You can get a copy of the zlib package from equi4 , which provides it as part of the tclkit

Tcl interpreter / packaging system support . It does not support the full interface used in 8.6, but it is sufficient for you to compress and decompress.

Or, you can just use / tclkit

instead of and create a zlib package already.tclsh

wish

+1


a source







All Articles