The Zlib package is used by Tclkit to read compressed Starkits but it too is available to developers.
Given that the contents of a Starkit are already compressed, one common use for Zlib is to compress a client/server communications protocol by adding just a few lines of code.
For example, the server side of a client/server application might use something like the following to send data to the client:
fconfigure -buffering full \ -translation binary $client ... proc send_to_client {client txt} { set data [zlib compress $txt] set len [binary format s \ [string length $data]] puts -nonewline $client "$len$data" flush $client }
Similarly, the client side would receive it using something like the following:
fconfigure -buffering full \ -translation binary $server ... proc receive_from_server {server} { binary scan [read $server 2] s len if {$len} { set data [read $server $len] set txt [zlib decompress $data] } else { set txt "" } return $txt }