To expand on the above post from pmqs. If you are generating the HTML, you can use the code below to compress/uncompress the HTML. I find I can compress a 100K HTML to about 9K with these tools, and then save the variable in a DB for later reuse. Excellent!
use IO::Compress::Gzip qw( gzip $GzipError ); use IO::Uncompress::Gunzip qw(gunzip $GunzipError ); my ( $uncompresedHTML, $compressedHTML ); . . . gzip \$uncompressedHTML => \$compresedHTML; . . . gunzip \$compressedHTML => \$uncompresedHTML;
If your getting the zipped variable from a file, there are many ways to compress/uncompress data, so you may have to use 'qx/ /;' to use a system application and get the results back.
Good Luck
"Well done is better than well said." - Benjamin Franklin
In reply to Re: Uncompress gzip from variable
by flexvault
in thread Uncompress gzip from variable
by Adamba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |