Open ilesinge opened 9 years ago
The data present in the redirection link is converted from the original document to Base64, thus it is inherently longer.
Ideally, the redirect link should be shorter than the document itself.
A compression algorithm such as gzip or LZW (or a home-made solution) could be used.
Example JS compression code/librairies: https://github.com/beatgammit/gzip-js https://github.com/pieroxy/lz-string/ https://github.com/floydpink/lzwCompress.js https://gist.github.com/revolunet/843889
Ideally the chosen algorithm's implementation would be, itself, small.
ping @TBaudon
Also: https://github.com/nmrugg/LZMA-JS But https://github.com/pieroxy/lz-string/ seems more interesting (for its size + the compressToEncodedURIComponent / decompressFromEncodedURIComponent functions).
The data present in the redirection link is converted from the original document to Base64, thus it is inherently longer.
Ideally, the redirect link should be shorter than the document itself.
A compression algorithm such as gzip or LZW (or a home-made solution) could be used.
Example JS compression code/librairies: https://github.com/beatgammit/gzip-js https://github.com/pieroxy/lz-string/ https://github.com/floydpink/lzwCompress.js https://gist.github.com/revolunet/843889
Ideally the chosen algorithm's implementation would be, itself, small.
ping @TBaudon