Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: PerlIO::gzip can't handle appended stuff

by haukex (Bishop)
on Apr 16, 2021 at 11:56 UTC ( #11131367=note: print w/replies, xml ) Need Help??

in reply to PerlIO::gzip can't handle appended stuff

AFAICT from Bug #90480, I think PerlIO::gzip may not support this. I usually use the core modules IO::Compress::* and IO::Uncompress::*. Their objects can also be used like filehandles - this works for me:

use IO::Uncompress::Gunzip (); my $in = IO::Uncompress::Gunzip->new('tst.gz', MultiStream=>1 ) or die "$IO::Uncompress::Gunzip::GunzipError"; print while <$in>; close $in;

Replies are listed 'Best First'.
Re^2: PerlIO::gzip can't handle appended stuff
by Skeeve (Parson) on Apr 16, 2021 at 12:21 UTC

    I already tried that as well and it also just prints the first part.

    It works! Thanks!

    Just have to add Multistream like so:

    my $in = new IO::Uncompress::Gunzip "tst.gz", Multistream => 1 or die "IO::Uncompress::Gunzip failed: $GunzipError\n"; print while <$in>;


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11131367]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2021-05-14 05:01 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (148 votes). Check out past polls.