base32 encodes or decodes a file or standard input using the RFC 4648uppercase alphabet (A-Z and 2-7). It is implemented in pure MoonBit andhas the same byte-oriented behavior on Native and Wasm.
This documents the cli/base32@0.1.0 candidate. It is not published untilthe release gate and exact MoonX acceptance pass.
The supported options are -d/--decode, -i/--ignore-garbage, and-w COLS/--wrap=COLS. Encoding wraps at 76 columns by default. -w0disables wrapping and the final newline. Decoding accepts line feeds betweengroups; the GNU alphabet is uppercase only, and with -i, other bytes outsidethe alphabet are ignored. Exactly one file operand is accepted; - or nooperand reads standard input. Complete decoded groups are written immediately,so a later malformed group can leave a valid prefix on stdout.
Invalid padding, incomplete groups, and invalid wrap sizes are errors andreturn status 1 or 2 for argument errors. As in GNU coreutils, non-zero unusedtail bits are accepted during decoding.