3 ms·
What I think you're overlooking here is the requirement that the data part also be "url-safe". If this requiement was not present, you'd be right that the binar
by jepler 3y ago
What I think you're overlooking here is the requirement that the data part also be "url-safe". If this requiement was not present, you'd be right that the binary encoding is better ("100% efficient")
url-safe decimal: log2(10) * 3 / 10 = 99.7%
url-safe alphanumeric: log2(39) * 2 / 11 = 96.1% efficient [39 out of 45 codes are URL-safe per article author]
url-safe base64url: log2(64) / 8 = 75% efficient