tcl::tr...:adler32(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

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