On Wed, Nov 20, 2013 at 11:32 PM, neil.lunn <n...@mylunn.id.au> wrote:

>
> This approach may work for you is the compressed data is actually in a
> scalar and not too large. And not too small. YMMV.
>
> my $z = read_file "product.json.gz";
>
> my $io = IO::Scalar->new( \$z );
> $io->seek( -4, 2 );
> $io->read( my $buf, 4);
>
> my $uncompressed_size = unpack( 'V', $buf );
>


This indeed does work in my tests.   Thanks for all the help, Neil.   I
really appreciate the time you spent on this.



-- 
Bill Moseley
mose...@hank.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to