Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

[1] https://rfc.zeromq.org/spec/32/



Thank 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/


Nice, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: