An algorithmically reversible personal URL shortener
tantek.pbworks.com
tantek.pbworks.com
Simply converting to base 60 or 64 wouldn't work, but since most URLs have characters that are close to each other, what about storing the differences between characters and/or using Huffman coding (or something similar) to give shorter symbols to the most common characters/differences? Maybe a preshared dictionary of common URL components?
The fact is, not many people are going to go devise their own URL shortening algorithm and implement it. While it is a good idea, I just don't think many people will put in that kind of effort.
What might work is a more general algorithm. An algorithm that can reliably shrink and unshrink any URL.
I'm not sure, but this might not be possible considering that many people have invented compression algorithms, and the general rule is that if you compress data, you are going to loose data. (I'd like to hear someone's opinion on that considering I haven't dove deep into compression)
Edit: By 'possible' I mean 'meaningfully possible'. Taking a URL around 50-80 characters and making it around 20-30.
Is that the case with URLs? Probably not directly. Certain atoms (.com, www) might be encodable to save space, but it'll not necessarily be a big gain.
* Presentations
* Email
* IM and Twitter
Given these use cases, what, exactly, is the utility of retaining the longer URL? If every time you reference the location it's through the short URL, then the advantages of the longer URL (comprehensibility, mainly) are lost -- because nobody will ever look at it!It seems like the only reason to do this is to maintain compatibility with systems which impose a particular URL scheme.
The post is a good argument for making shorter URLs in general, not a good argument for a personal and application-specific URL shortener.
First, only a tiny number of people will actually devise, implement, and install their own shortener. Perhaps the major blogging platforms would adopt it, but that still leaves a large number of sites uncovered.
Second, consumers of URL shorteners actually want unique short URLs so they can track clickthru. So even if a site self-hosts reversible personal short URLs, consumers will not adopt it.
I have no alternative positive suggestion. It would be nice if URL shorteners called a webhook on the shortened domain.
I can't find any actual code for the shortener. But the base60 should allow you to come up with your own shortening scheme