Today I Learned - Rocky Kev

TIL using encoding to shorten letters

POSTED ON:

TAGS:

Base10 - our current numbering system
Base16 - Hexidecimal.
Base64 - usually binaries like image files. Also widely used for email attachments.

While exploring a System Design course, I learned that URL shorteners (like Bitly), they:

  1. Hash the URL (e.g., MD5 or SHA256, etc.), so it's uniquely generated.
  2. Then encoded for display.

Using base64 encoding, a 6 letters long key would result in 64^6 = ~68.7 billion possible strings.
Using base64 encoding, an 8 letters long key would result in 64^8 = ~281 trillion possible strings.


Related TILs

Tagged:

TIL using encoding to shorten letters

All about that base64

TIL using encoding to shorten letters

All about that base64

TIL using encoding to shorten letters

All about that base64