介尘部落

文学|音乐|休闲娱乐|计算机技术|地球科学|社会学——知识成就命运


A shorter and URL friendly GUID

As a follow-up on my post from yesterday about generating shorter GUIDs, I’ve created a small helper class in C#. The class encodes a GUID into a 22 character long string and decodes the string back to the original GUID again.

That way you can save 10 characters from the original GUID and it is ASCII encoded so it will work perfectly in a URL as a query string or in ViewState.

It takes a standard GUID like this:

c9a646d3-9c61-4cb7-bfcd-ee2522c8f633

And converts it into this smaller string:

阅读全文
公众号-介尘阅读时光
赞赏支持

0 Responses to “A shorter and URL friendly GUID”

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

×