Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Unusual IO::Uncompress::Gunzip behavior

by pmqs (Pilgrim)
on Sep 27, 2012 at 09:15 UTC ( #995955=note: print w/replies, xml ) Need Help??

in reply to Unusual IO::Uncompress::Gunzip behavior

You need to use the MultiStream option if you want to deal with concatenated gzip files.

use strict; use warnings; use IO::Compress::Gzip qw(gzip $GzipError) ; use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; my $gzipped; for my $txt ( qw(Alpha Beta Gamma)) { gzip \$txt => \$gzipped, Append => 1 or die "gzip failed: $GzipError\n"; } my $out; gunzip \$gzipped => \$out, MultiStream => 1 or die "gunzip failed: $GunzipError\n"; print "Uncompressed is:\n$out\n";

Replies are listed 'Best First'.
Re^2: Unusual IO::Uncompress::Gunzip behavior
by cmv (Chaplain) on Sep 27, 2012 at 14:54 UTC

    Many thanks for pointing this out!

    Danged if I can figure out how I missed that after going through the docs so many times.

    Maybe it's time for reading glasses...


    Update: This test program will hang on *nix machines that have IO::Compress 2.015. I've found that you need at least 2.020, and have upgraded my systems to 2.055

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995955]
[Corion]: Discipulus: Better buy a new PC (well, self-build one from parts) than buy a new car :-)
[choroba]: the boot time on my laptops is more than satisfactory, but the desktop boots in 30+ secs
[choroba]: because of some problems of the wicked with systemd :-(
[Corion]: choroba: Just imagine how bad it must be without systemd ;-D
[choroba]: but I'm not sure it's worth my time...
NodeReaper shudders
[Corion]: choroba: That chart is frustrating as it pits cold hard numbers against puttering around with an annoying problem :)
[choroba]: I only use it when I want to avoid a task...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-07-27 09:18 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (407 votes). Check out past polls.