tcl::...:zlib(3tcllib)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 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 channel chan, 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 (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