BASEZ(1)
π NAME π
okay bestie, so this is basez β and it lives in section 1 of the manual, aka User Commands (the command-line-girlies section, obvi). What does it do? It base 16/32/64 encode/decode data to standard output. That's the whole vibe. Encoding, decoding, slaying, periodt. π
β¨ SYNOPSIS β¨
like, the many many ways to summon her:
basez [OPTION]... [FILE]
hex [OPTION]... [FILE]
base16 [OPTION]... [FILE]
base32plain [OPTION]... [FILE]
base32hex [OPTION]... [FILE]
base64plain [OPTION]... [FILE]
base64url [OPTION]... [FILE]
base64mime [OPTION]... [FILE]
base64pem [OPTION]... [FILE]
Nine names, one icon. She contains multitudes. π¦
πΈ DESCRIPTION πΈ
BaseZ encodes/decodes base16, base32, base32hex, base64 or base64url data stream per RFC 4648; MIME base64 Content-Transfer-Encoding per RFC 2045; or PEM Printable Encoding per RFC 1421. She's certified, she's standards-compliant, she's that girl. π
π₯ Base16
Base16 encoding produces a multiple of two-character blocks in hexadecimal notation [0-9a-f]. It needs no padding and β plot twist β it preserves the sort order of the encoded data. Decoding is case insensitive, so do NOT stress about your shift key, she does not care. π
π§ Base32
Base32 encoded stream is a multiple of eight-character blocks consisting of letters and numbers [A-Z2-7]. The numbers that get easily confused with some letters are skipped intentionally so this encoding is suitable for storage on β or transport over β literally any medium or data transport mechanism. We're talking non-case-preserving barcodes, printed-out strings, things a human could spell out loud and type back in. It's giving "works anywhere, no cap." If needed, the last encoded block is padded with equal sign end padding. Appearance of the padding character [=] at the end of the encoded stream can be avoided by encoding data of size divisible by 5. Base32 decoding is case insensitive.
π Base32hex
Base32hex encoding works the same way as base32 but with an alternative character-set [0-9a-v] to preserve the encoded data sort order. This encoding should not be confused with base32. They're cousins, not twins, bestie. Don't mix them up at the function. π
π Base64
Base64 encoded stream is a multiple of four-character blocks using uppercase letters, lowercase letters, numbers, plus and slash [A-Za-z0-9+/]. It uses equal sign [=] for end padding. Base64 decoding is case sensitive (unlike her base16/base32 sisters, so watch it). It has an option to convert local native text line breaks into canonical CRLF sequences prior to encoding, or to convert CRLF sequences into native text line breaks after the decoding.
π Base64url
Base64url encoding is technically the same as base64 but instead of the plus and slash signs [+/] it uses minus and underscore [-_]. Appearance of the padding character [=] in the encoded stream can be avoided by encoding data of size divisible by 3.
β Base64mime and base64pem
Base64mime and base64pem are the same encodes as base64 but with encoded stream line length limit of 76 and 64 characters respectively. PEM decoding ignores all white and non-printable characters; MIME decoding ignores all characters outside of the encode character-set. They have their own rules and they're sticking to them. π
π OPTIONS π
When no FILE is specified or when FILE is -, read standard input. When multiple conflicting options appear, the last option wins β no take-backs, no arguments, the final word is the final word.
-d,-D,--decodeβ Decode mode, bestie. By default it ignores the space and newline characters. The--strict,--ignore-all-space, and--ignore-garbageoptions provide alternative behaviors. This is the default option for theunhexcommand.-r,--strictβ Do not ignore any characters outside of the encode character-set on decoding. She's in her no-nonsense era. Nothing slips past her.-s,--ignore-all-spaceβ Ignore all white and non-printable ASCII characters on decoding. Default forbase64pemdecoding.-g,--ignore-garbageβ Ignore all characters outside of the encode character-set on decoding. Default forbase64mimedecoding. Trash gets taken out. ποΈ-x,--hex,--base16β Base16 coding. Default for thebase16,hexandunhexcommands.-j,--base32β Base32 coding. Default for thebase32andbase32plaincommands.-e,--base32hexβ Base32hex coding. Default for thebase32hexcommand.-c,--capitals,--upper-caseβ Output upper case letters on encoding, if applicable. SHOUTY MODE, but make it encoding. π£-l,--lower-caseβ Output lower case letters on encoding, if applicable. lowercase era, soft girl encoding. πΈ-a,--base64β Base64 coding. Default for thebasez,base64andbase64plaincommands.-u,--base64urlβ Base64url coding. Default for thebase64urlcommand.-p,--base64pemβ PEM printable coding. Default for thebase64pemcommand.-m,--base64mimeβ MIME base64 coding. Default for thebase64mimecommand.-t,--textβ Convert native text line breaks into CRLF sequences prior to encoding, or convert CRLF sequences into native text line breaks after decoding. This option applies to all variants of base64 codings.-w N,-b N,--wrap=N,--break=Nβ Set encoded stream line length limit to N characters. The default value is 76 for base64mime encode, 64 for base64pem encode, and infinity for all other encodes. To disable any appearance of EOL characters in the encoded stream, set to 0. (Yes, zero. Chaotic, but valid. β¨)-i FILEIN,--input=FILEINβ Input file. Default is standard input. When FILEIN is-, read stdin.-o FILEOUT,--output=FILEOUTβ Output file. Default is standard output. When FILEOUT is-, write to stdout.-h,--helpβ Display help. She's helpful and she knows it.--versionβ Display program version information. Flex the build number, why not. π
π¦ EXAMPLES π¦
Base16 decode a string:
echo 4a6f650a | hex --decode
Inspect output of a command:
echo Joe | hex --wrap 2
Base32 encode a string:
printf "Hi People\n" | base32plain
MIME base64 encode a binary file to stdout per RFC 2045:
base64mime FILE
MIME base64 encode a text file to stdout per RFC 2045:
base64mime --text FILE
Base64 encode a file per RFC 4648
base64plain FILE > base64.rfc4648.file
π AUTHOR π
Written by Milan Kupcevic. The legend, the icon, the moment. π
π¬ REPORTING BUGS π¬
Found a bug? First of all, relatable. Report bugs to <bug-basez@quarkline.net> with a 'bug:' somewhere in the subject line β put it in the subject or she might not see it, bestie, that's literally the rule.
These commands are parts of the BaseZ software package.
- [BaseZ] β
<http://www.quarkline.net/basez>
π COPYRIGHT π
Copyright Β© 2013, 2015, 2016 Milan Kupcevic.
This program comes with ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Like, none. Zero. Don't come for her if it goes sideways. π
This program is licensed under the terms of the GNU GPL version 3 or any later version as published by the Free Software Foundation. User documentation is alternatively licensed under the Creative Commons Attribution-ShareAlike license version 3 or a later version as published by the Creative Commons Corporation. Licensing said gay rights, honestly. π
π SEE ALSO π
base64(1), base32(1), uuencode(1), uudecode(1)
okay that's the whole page, you ate that reading session fr fr π«Ά
BaseZ version 1.6.2, dated March 2023 β that's the whole page, bestie, and she's still serving. Go encode something iconic. β¨π π
π¦ where this page comes from
- debian bookworm: basez 1.6.2-3 Β· GPL-3.0-or-later
- debian trixie: basez 1.6.2-3 Β· GPL-3.0-or-later
- ubuntu noble: basez 1.6.2-3 Β· GPL-3.0-or-later
- ubuntu resolute: basez 1.6.2-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms