SNOBOL4ZLIB(3)
π SNOBOL4ZLIB π
ok so bestie, this is the zlib page from the CSNOBOL4 manual, and it's literally the compression girlie you've been looking for. no cap. π
β¨ NAME β¨
zlib β the compression/decompression library, but make it accessible from SNOBOL4 π¦
β¨ SYNOPSYS β¨
like, this is the whole vibe right here:
-INCLUDE 'zlib.sno'
ZLIB_COMPRESS(string,[level])
ZLIB_UNCOMPRESS(string,[wbits],[ibufsize])
ZLIB_CRC32(string[,starting_value])
ZLIB_ADLER32(string[,starting_value])
yes queen, four functions, one include, we're doing this π
β¨ DESCRIPTION β¨
okay so the zlib module gives you direct, in-memory access to zlib's compression and checksum routines. and when I say "in the manner of the Python zlib module" I mean it β the Python zlib module. that's the blueprint. that's the moment. β¨
if what you actually want is compressed file I/O, that's a different girl, go see snobol4io(1). π«Ά
πΈ the functions, one by one
ZLIB_COMPRESS(string,[level])β the optional second argument is your compression level:0-9or-1. it defaults to6. pick your fighter bestie πͺZLIB_UNCOMPRESS(string,[wbits],[ibufsize])β the optional second argument controls the (log2) window buffer size (and container format?). note the little question mark, that's the manual being honest, not me. the optional third argument picks the initial output buffer size β and it will be doubled as needed, so don't stress about sizing it perfectly. she grows π±ZLIB_CRC32(string[,starting_value])β the optional second argument is the starting value. you'd use that when you're running a CRC across multiple blocks of data. defaults tozero. πZLIB_ADLER32(string[,starting_value])β the optional second argument is the starting value, for running the checksum over multiple blocks of data. defaults toone. β
lowkey the pattern here is: optional starting value = you're chaining blocks together. iconic behavior fr fr.
β¨ SEE ALSO β¨
go read these too, they're all part of the same little ecosystem:
β¨ AUTHOR β¨
Phil Budne β the actual main character who wrote this π
π that's the whole page bestie, you're so ready π
and for the record, this was CSNOBOL4B 2.3.1, dated March 31, 2022 β so if you're quoting her, quote her right. periodt. π
β¨π¦
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms