in reply to Re: Shorten Url/Link Param
in thread Shorten Url/Link Param

Thanks for reply Thomas. So the actual shorten url method is just an unique ID pointing to the long Url/string that being associated to? If this is the case, then I have misunderstood the whole "shortening" method wrongly. I thought it is some kind of encoding and decoding method.

Could you further clarify on this? Generating a unique random short string and associating it to my long url/string is pretty much straight forward.

Replies are listed 'Best First'.
Re^3: Shorten Url/Link Param
by Marshall (Canon) on Dec 05, 2017 at 15:39 UTC
    Yes, this is a translation process not encode/decode. It is not possible to compress (encode) a long URL into a much shorter one and have enough information to recreate the long URL from only the very short URL. There needs to be a translation hash table. For reference see Wiki Tiny Url.