4 ms·
As far as I am aware, the standard implementation of a URL shortening algorithm is to convert the number to a higher base, not to generate a random string. This
by tshadwell 12y ago
As far as I am aware, the standard implementation of a URL shortening algorithm is to convert the number to a higher base, not to generate a random string. This has the advantages of greater loading speed, and smaller storage size.
Here is one I wrote long enough ago for me to be divorced from its implementation flaws: https://github.com/TShadwell/go-shorten/blob/master/shorten/shorten.go#L84 https://github.com/TShadwell/go-shorten/blob/master/shorten/...
- xwowsersx 12y agoThat makes sense. Thanks for the code.