yencode(n)
β¨ yencode(n): Text encoding & decoding binary data β¨
okay so bestie, welcome to the yencode(n) page. this manual is lowkey iconic and highkey here to make yEnc make sense. it's giving binary-to-text glow-up for Usenet, no cap. we're gonna read every flag together, because the way that this page lists options? obsessed. periodt. π
π NAME π
yencode β Y-encode/decode binary data
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require yencode ?1.1.4?
::yencode::encode string
::yencode::decode string
::yencode::yencode ?-name string? ?-line integer? ?-crc32 boolean?
(-file filename | ?--? string)
::yencode::ydecode (-file filename | ?--? string)
πΈ DESCRIPTION πΈ
This package provides a Tcl-only implementation of the yEnc file encoding. It's a recently introduced method of encoding binary files for transmission through Usenet. This encoding packs binary data into a format that requires an 8-bit clean transmission layer, but that escapes characters special to the NNTP posting protocols. See http://www.yenc.org/ for details concerning the algorithm.
::yencode::encode stringβ returns the yEnc encoded data.::yencode::decode stringβ Decodes the given yEnc encoded data.::yencode::yencode ?-name string? ?-line integer? ?-crc32 boolean? (-file filename | ?--? string)β Encode a file or block of data.::yencode::ydecode (-file filename | ?--? string)β Decode a file or block of data. A file may contain more than one embedded file, so the result is a list where each element is a three element list of filename, file size and data.
π OPTIONS π
-filename nameβ Cause theyencodeorydecodecommands to read their data from the named file rather than taking a string parameter.-name stringβ The encoded data header line contains the suggested file name to be used when unpacking the data. Use this option to change this from the default of"data.dat".-line integerβ The yencoded data header line contains records the line length used during the encoding. Use this option to select a line length other than the default of128. Note that NNTP imposes a1000character line length limit and some gateways may have trouble with more than255characters per line.-crc32 booleanβ The yEnc specification recommends the inclusion of a cyclic redundancy check value in the footer. Use this option to change the default fromtruetofalse.
example vibe:
% set d [yencode::yencode -file testfile.txt]
=ybegin line=128 size=584 name=testfile.txt
-o- data not shown -o-
=yend size=584 crc32=ded29f4f
π REFERENCES π
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category base64 of the Tcllib Trackers (http://core.tcl.tk/tcllib/reportlist). Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
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.
π KEYWORDS π
encoding, yEnc, ydecode, yencode
π¦ CATEGORY π¦
Text processing
π COPYRIGHT π
Copyright (c) 2002, Pat Thoyts
that's the whole yencode(n) page, bestie. source: tcllib, version: 1.1.4, manual: yencode(n). no date on this footer, just version 1.1.4 energy. periodt. π β¨
π¦ 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) 2002, Pat Thoyts
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms