Encodings

Z85

ZeroMQ base85 with an alphabet safe to paste into source code. Whole four byte groups only
IDz8515 / 20base85 · 85 characters
Encoding / Base85

Z85

Base85 safe to paste into source code.

Overhead
+25% on random bytes
Padding
none
Standard
ZeroMQ RFC 32/Z85
Used by
ZeroMQ
family 2 / 20

Sample

Out
xK#0@zY<mxA+]nf
Back
"hello world!"

Access

Importimport { z85 } from "@agntn/encodings/base85"
CLIencodings encode z85 'hello world!'
Tryplayground with the sample above
Kinascii85

ZeroMQ wanted base85 you can drop into a C string or a JSON value without escaping. So no ", no ', no backslash. XML is another story, < and & are both in there.

ts
z85.encode(hex.decode("864FD26FB559F75B"));  // "HelloWorld"

That's the example from ZeroMQ RFC 32. Did they pick the bytes to spell it? Of course they did. Z85 only does whole groups. Encode two bytes and you get an error, not padding. Pad it yourself if you have to.