tcl::tr...:adler32(n)
β¨ NAME β¨
okay so bestie, welcome to tcl::transform::adler32 β the Adler32 transformation π it's a little channel glow-up that lives in the tcl::tr...:adler32(n) corner of the reflected/virtual channel support zone π¦
πΈ SYNOPSIS πΈ
package require Tcl 8.6 9
package require tcl::transform::core ?1.1?
package require tcl::transform::adler32 ?1.1?
::tcl::transform::adler32 chan -option value...
π DESCRIPTION π
so the tcl::transform::adler32 package hands you a command that builds a channel transformation. the way it works? it lets all the read and written bytes just pass through unchanged β literally like tcl::transform::identity, no notes β but on top of that it also keeps continuously computing the adler32 checksums of all the data it's seen, separately for each direction, and stashes them into Tcl variables you pick when you construct it β¨ no cap.
the other transformations hanging out in this same module are tcl::transform::counter, tcl::transform::crc32, tcl::transform::identity, and tcl::transform::observe β squad goals fr fr π«Ά
oh and the internal TclOO class doing the actual transform handler work is a subclass of the tcl::transform::core framework. it's giving nepo baby but in a legit inheritance way π
π API π
::tcl::transform::adler32 chan -option value...β this command creates an adler32 checksumming transformation layered on top of the channelchan, and it returns its handle back to you π the options it accepts are:-read-variable varnameβ the value of this option is the name of a global or namespaced variable, aka the spot where the transformation has to store the adler32 checksum</s> of the data read from the channel π if you don't specify it, or you pass the empty string, then the checksum for the read direction just... doesn't get saved. it's giving "we don't talk about that direction" π-write-variable varnameβ the value of this option is the name of a global or namespaced variable, aka the spot where the transformation has to store the adler32 checksum of the data written to the channel π same deal: if it's not specified, or it's the empty string, the checksum for the write direction is not saved. bye bestie, no receipts π
π BUGS, IDEAS, FEEDBACK π
ngl this document, and the package it describes, will undoubtedly contain bugs and other problems. it's not a vibe, it's a fact. so please report those in the category virtchannel of the Tcllib Trackers over at http://core.tcl.tk/tcllib/reportlist π and also pls pls pls report any ideas for enhancements you may have for either the package and/or the documentation β we want them, fr fr π
when you're proposing code changes, please provide unified diffs, i.e the output of diff -u. don't be shy, be precise β¨
also note further that attachments are strongly preferred over inlined patches. attachments can be made 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. it's giving "do the extra click, it's worth it" π
π₯ KEYWORDS π₯
adler32, channel transformation, checksum, reflected channel, tip 230, transformation, virtual channel
π CATEGORY π
Channels
β COPYRIGHT β
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page bestie π this was tcl::tr...:adler32(n) from the Reflected/virtual channel support family, brought to you by tcllib, version 1.1 β go forth and checksum, main character π¦β¨π
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- 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