Sorry if I completely misunderstood the problem, but won't the following work?
use strict; use warnings; use feature 'say'; use IO::Compress::Gzip 'gzip'; use IO::Uncompress::Gunzip qw/ gunzip $GunzipError /; my $s = <<'END'; I include only the bare bones because I tried something like 20 differ +ent things without success and I'm embarrassed. :( Non-streaming requ +ests are working perfectly with approximately this code. The endpoint + for this code is a END gzip( \$s, \my $c ); my @chunks = unpack '(a42)*', $c x 5; my $partial = ''; my $result = ''; my $n = 1; for ( @chunks ) { gunzip( \( $partial . $_ ), \my $o, Transparent => 0, TrailingData + => my $t ); $partial .= $_ and next if $GunzipError; $partial = $t ? $t : ''; print "message #", $n ++, "\n$o"; }
In reply to Re^5: Uncompress streaming gzip on the fly in LWP::UserAgent/WWW::Mechanize
by vr
in thread Solved: Uncompress streaming gzip on the fly in LWP::UserAgent/WWW::Mechanize
by Your Mother
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |