Tools like gzip and xz compress bitstrings to bitstrings. We want something
designed to do lossless compression on short to medium strings and produce printable
ASCII or any kind of printable text. This would allow us to create our own URL
shortening system.
We need to combine these 2:
- https://github.com/Ed-von-Schleck/shoco
- http://base91.sourceforge.net/ or https://github.com/thenoviceoof/base92
Into one single command line tool.
Or at least both tools can be made into command line tools, and simple composition can allow us to have shortened text to text function.
http://www.chaos.org.uk/~eddy/project/ascii.html
For now we have:
> # needs about 40 words before we make any profit
> echo -n "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas efficitur, ante eu vehicula imperdiet, est sem maximus justo, non lacinia erat quam dictum nulla. Suspendisse feugiat sagittis lacinia. In tellus nulla, vulputate in convallis a, dapibus sit amet purus. Curabitur." | tee >(wc --chars) | gzip --stdout --best | base64 --wrap 0 | wc --chars
279
268