3 ms·
We have a similar problem at work right now, but due to different constraints we've settled on Base85. Slightly denser than Base64, but still just plain old pri
by MrBuddyCasino 3y ago
We have a similar problem at work right now, but due to different constraints we've settled on Base85. Slightly denser than Base64, but still just plain old printable ASCII characters and the following characters are still "free" so one can use them as field delimiters in a CSV-style format:
"',/[]\
Incidentally, this also makes them JSON-Safe.
Base94 uses all printable characters, and Base122 uses both printable characters and whitespace.
UUIDs encoded in various alphabets:
len algo value
24 Base64 padded wScmB8cVS/K05Wk+nORR8Q==
22 Base64 unpadded osnQ3DUDTDuUQBc9mBRYFw
20 Base85 rHoLuTk%W0fgpY+`c>xc
20 Base94 d(+H"Q/hP}i}d9<KeAt)%
18 Base122 @#FoALt`92vSt@
- Zamicol 3y agoI'm not following as Base85 isn't JSON safe. For example, { and } carry meaning in JSON.
- MrBuddyCasino 3y agoI should have specified what I meant by that - if you put "'\ in json strings you have to escape them.