9 ms·
I'm having trouble thinking of any situations where you're free to use any alphanumerics, but you absolutely can't use anything else. The closest thing that com
by andfarm 15y ago
I'm having trouble thinking of any situations where you're free to use any alphanumerics, but you absolutely can't use anything else. The closest thing that comes to mind is DNS, and that's a 36-character set, not 62.
Ascii85 (http://en.wikipedia.org/wiki/Base85 http://en.wikipedia.org/wiki/Base85) uses a similar concept, but using the majority of the printable ASCII characters. It gets a hard-to-beat 20% expansion on binary data (4 bytes in 5 chars) without requiring bigint math.
- deweller 15y agoI'm pretty sure the canonical use case for this would be for including complex binary data in a URL. A URL shortener might be a good example.
- dsl 15y agohttp://en.wikipedia.org/wiki/Base64#Implementations_and_history http://en.wikipedia.org/wiki/Base64#Implementations_and_hist...
- DenisM 15y agoYou're right on DNS, I was not thinking clearly when I wrote that part. I will fix up the article. The prime scenario that caused me to think about this problem is indeed URL components, and in particular object identifies for RESTful protocols. The other thing I was thinking about were cookies values, which I have had problems with in the past. EDIT: The most annoying part about base64 is that different systems have different restrictions. With Maze62 I won't have to think about which system my data will end up in.