Here's my bright idea, I need to pass some data to a perl script that will return an image generated from it. Because the data will be embeded into the src tag (ie href='scrip.pl?data=whatever') I need to make sure I encode it as something appropriate for a URL, and I would like to compress it as well.
Right now I have:
So, first question - is Convert::Base32 the way to go? Or are there better alternatives?use Convert::Base32 qw(); use Compress::Zlib qw(); $data=Convert::Base32::encode_base32(Compress::Zlib::compress($text));
Secondly, I am not getting great results with the compression - the data has a very small alphabet (it's basically DNA sequence - 'ACTG' - plus numbers, some whitespace, and a bit of markup - <> and []) so I was thinking it would get shrunk to very little; is there a more appropriate library I should be using?
In reply to compress data to pass in url? by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |