Friday, February 08, 2008
A few years ago I wrote a guid shrinker, so that I could send out urls with guids in them, but have shorter messages. This was for mobile work, and so I called them "Muid's" (for mobile unique identifier).

To do this, I wrote a converter that converted from a 16 byte guid to a 21 or 22 character string, increasing the character set to 64 characters instead of the 16 characters used by guid's default ToString() (A-Z, a-z, 0-9, - and $).

It was with a little embarrassment that I read Dave Transom and Mads Kristensen's posts, where they use the Base64 encoder to do the character encoding, while I didn't think of that, and wrote an encoder / decoder myself.

So check out Dave's ShortGuid if you want shorter urls with all the benefits of guids (very hard to guess, globally unique), but don't want to sacrifice the extra 10-14 characters in every url.

Comments are closed.