tcl::...:zlib(3tcllib)
πΈ tcl::transform::zlib β zlib (de)compression β¨
okay so bestie, you know how a channel is like a whole vibe, and sometimes you wanna squish the stuff going through it? yeah. that's this. welcome to tcl::transform::zlib, part of the tcllib family, living under the Reflected/virtual channel support umbrella (that's the manual section, iykyk π
).
π NAME π
tcl::transform::zlib β zlib (de)compression, but make it a channel transformation π«Ά
β¨ SYNOPSIS β¨
package require Tcl 8.6 9
package require tcl::transform::core ?1.1?
package require tcl::transform::zlib ?1.1?
::tcl::transform::zlib chan ?level?
π¦ DESCRIPTION π¦
The tcl::transform::zlib package hands you a command that makes a channel transformation. what does that transformation do? literally it zlib compresses everything you write into it, and decompresses everything you read back out. so it's giving zip, it's giving unzip, it's giving both at once. iconic.
the internal TclOO class that actually implements the transform handler? it's a subclass of the tcl::transform::core framework. so it's part of the fam, it knows the rules, it's not out here freelancing. no cap. π
π API π
::tcl::transform::zlib chan ?level?β this command creates a zlib compressor transformation sitting on top of the channelchan, and returns its handle. that's it, that's the whole thing, and honestly? obsessed.
so like, the level is how much effort gets put into the compression β think of it as the how hard should I try dial. it runs from 0 to 9, and if you don't say anything it defaults to 4. middle of the road, comfy, cute. β
π BUGS, IDEAS, FEEDBACK π
ngl this document, and the package it describes, will undoubtedly contain bugs and other problems. like, for sure. that's just how it is bestie π
please report such in the category virtchannel of the Tcllib Trackers, over at http://core.tcl.tk/tcllib/reportlist. and if you've got ideas for enhancements for either the package and/or the documentation? report those too, we want them, we love them π«Ά
when you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the format. periodt.
also β and this is the important one β attachments are strongly preferred over inlined patches. not me begging you to attach the file. you can make an attachment by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. boom, attached, slay. π
π KEYWORDS π
channel transformation, compression, decompression, reflected channel, tip 230, tip 234, transformation, virtual channel, zlib
πΈ CATEGORY πΈ
Channels
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay and for the cute sign-off: this whole thing is tcllib version 1.1, page tcl::...:zlib(3tcllib), and that footer date/version energy is exactly that β tcllib, 1.1, and we're done here. go compress something, bestie π§π
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms