| ENCODING(2) | System Calls Manual | ENCODING(2) |
Encoding: enc, dec - encoding and decoding of byte arrays as text
include "encoding.m"; base16 := load Encoding Encoding->BASE16PATH; base32 := load Encoding Encoding->BASE32PATH; base32a := load Encoding Encoding->BASE32APATH; base64 := load Encoding Encoding->BASE64PATH; enc: fn(a: array of byte): string; dec: fn(s: string): array of byte
Encoding presents a common interface to several ways of encoding binary data (represented in arrays of bytes) as printable text, to be included in essentially textual data (such as XML) or sent through e-mail systems (as in MIME).
Enc returns a string with a textual encoding of the binary data in a.
Dec returns an array of bytes containing the binary data encoded in s.
Four encodings are provided, including all those defined by RFC3548; load the one required from the given path.
When decoding, white space and illegal characters are ignored; base 16 and base 32 decoders are case-insensitive.
/appl/lib/encoding