in reply to How to zip and unzip a page in a subroutine ??
I think your problem is that $ua is NULL
That's not to suggest ther may not be problems with your method of compression/decompression, but it's not the source of the error.
In Section
Seekers of Perl Wisdom