4 ms·
I think Base85 [0] warrants a mention for those needing to minimize the string representation length of their UUIDs. A year ago or so we had to store a referen
by piaste 5y ago
I think Base85 [0] warrants a mention for those needing to minimize the string representation length of their UUIDs.
A year ago or so we had to store a reference to one of our entities into a legacy third-party system, which used char(20) as the column size and of course couldn't be changed.
Since Base85 encodes a UUID as exactly 20 ASCII characters, it saved me from having to add an extra indirection. (Also, and to be honest mainly, from giving ammo to our CEO who had never liked UUIDs)
Of the various 85-character encodings, I thought Z85 [1] was the best one. It's not URL-safe, but it's safe for copy-pasting into queries, source code, XML, JSON, CSV, etc.
[0] https://en.wikipedia.org/wiki/Ascii85 https://en.wikipedia.org/wiki/Ascii85
[1] https://rfc.zeromq.org/spec/32/ https://rfc.zeromq.org/spec/32/
- sudhirj 5y agoNice, thanks, haven’t see. This before. Can’t say I like the symbols in there, but will add it as a reference. Should probably add base58 as well, Bitcoin uses it.
- Zamicol 5y agoThank you! I was familiar with Ascii85 but not Z85. I just added it to the "Other projects" section of my base converter. https://convert.zamicol.com/ https://convert.zamicol.com/