uuencode(n)
uuencode(n) π
okay bestie, so this is the manpage for uuencode β the Tcl package that UU-encodes and decodes binary data. β¨ It lives in section n of the manual, and it's giving "text encoding & decoding binary data" main character energy. π
NAME π¦
uuencode β UU-encode/decode binary data
SYNOPSIS π
package require Tcl 8.5 9
package require uuencode ?1.1.6?
::uuencode::encode string
::uuencode::decode string
::uuencode::uuencode ?-name string? ?-mode octal? (-file filename | ?--? string)
::uuencode::uudecode (-file filename | ?--? string)
DESCRIPTION πΈ
So like, this package is a Tcl-only implementation of the uuencode(1) and uudecode(1) commands. No cap. What it does is pack binary data into printable ASCII characters, which is honestly so iconic of it. π«
::uuencode::encode stringβ returns the uuencoded data. It will encode all the data you pass in, even if it's longer than the uuencode maximum line length (she does not care about your line limits, she's committed). And if the number of input bytes isn't a multiple of 3, then additional0bytes get added to pad the string. Padding era fr fr. π«Ά::uuencode::decode stringβ decodes the encoded data you give it. Heads up bestie: this will return any padding characters as well, and it is the caller's responsibility to deal with handling the actual length of the encoded data. (seeuuencode). So don't come for the package when the padding shows up, okay? π::uuencode::uuencode ?-name string? ?-mode octal? (-file filename | ?--? string)::uuencode::uudecode (-file filename | ?--? string)β UUDecode a file or block of data. And here's the gag: 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, mode value and data. Three elements. Filename, mode, data. Slay. π
β¨ OPTIONS β¨ π
-filename nameβ makes theuuencodeoruudecodecommands read their data from the named file instead of taking a string parameter. Like, pick a lane: file or string. π-name stringβ the uuencoded data header line contains the suggested file name to use when unpacking the data. Use this option to change it from the default of"data.dat". Yes,"data.dat". Defaults are always a little basic, ngl. π-mode octalβ the uuencoded data header line contains a suggested permissions bit pattern expressed as an octal string. To change the default of0644you can set this option. For instance,0755would be suitable for an executable. Seechmod(1). Permissions? We love a girl who knows her octals. π₯
EXAMPLES π
Look at her go:
% set d [uuencode::encode "Hello World!"]
2&5L;&\\@5V]R;&0A
% uuencode::uudecode $d
Hello World!
% set d [uuencode::uuencode -name hello.txt "Hello World"]
begin 644 hello.txt
+2&5L;&\@5V]R;&0`
`
end
% uuencode::uudecode $d
{hello.txt 644 {Hello World}}
Not the begin 644 hello.txt β¦ end moment. The way that header just works. π
BUGS, IDEAS, FEEDBACK π
Okay so real talk: this document, and the package it describes, will undoubtedly contain bugs and other problems. It's not a vibe, it's just the truth. π
Please report such in the category base64 of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist). Please also report any ideas for enhancements you may have for either the package and/or the documentation. We want the ideas. Give us the ideas. π«Ά
When proposing code changes, please provide unified diffs, i.e the output of diff -u. Periodt.
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. The left-most one. Don't miss it bestie. π
KEYWORDS β
encoding, uuencode
CATEGORY π¦
Text processing
COPYRIGHT π
Copyright (c) 2002, Pat Thoyts
and that's the whole page, bestie!! this one's from tcllib, version 1.1.6, and the page itself is dated uuencode(n) β iykyk π stay encoded, stay iconic, mwah π β¨
π¦ 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