UK based. Perl, XML/HTTP, SAP, Debian hacker.
Yesterday I spent a few hours banging my head against a brick wall. I'm using PerlIO::gzip on ActiveState Perl 5.8.8 to decompress a large XML file. The XML file decompresses perfectly with Cygwin's gzip or xmllint, but PerlIO::gzip sometimes mangles the file and it starts as XML then degenerates into soup and sometimes it decompresses the file perfectly.
I wasted quite a few hours thinking it was something else, but it's clearly a random problem with PerlIO::gzip, sometimes it works and sometimes it doesn't. I can't make any sense of it, how can it work some of the time and the rest of the time it generates gibberish?
I'm going to give IO::Uncompress::Gnuzip a go now to see if it's consistent and reliable. It's a shame as the PerlIO::gzip interface was very handy.
Precision (Score:2)
it's clearly a random problem with PerlIO::gzip, sometimes it works and sometimes it doesn't. I can't make any sense of it, how can it work some of the time and the rest of the time it generates gibberish? yet you say I'm going to give IO::Uncompress::Gnuzip a go now to see if it's consistent and reliable.
So, I infer, the cause of the observed problem is not clearly anything, as you don't yet have data ruling out other possible causes, because you've not yet tried the experiment of keeping everything else
Re: (Score:2)
Originally I thought that the same compressed file and the same Perl script could be run time after time and some of the time it would and some of the time it would not work. That really confused me, but it's a Windows box with an old version of ActiveState Perl on it, so I'm not expecting perfection.
I now think that some files can and some can't be processed. Once you have a "bad" compressed file
PerlIO::gzipcan't deal with it, but other methods can.IO::Compress::Gunzipdoes work with the same file that-- "It's not magic, it's work..."
A bug (Score:1)
Hi
This symptom normally means there's a bug in the code, in that some variable is uninitialized, and when used causes various results, depending on the value which happens to be in it.