ext/Compress-Raw-Bzip2/README
ext/Compress-Raw-Bzip2/t/000prereq.t
ext/Compress-Raw-Bzip2/t/01bzip2.t
+ext/Compress-Raw-Bzip2/t/09limitoutput.t
ext/Compress-Raw-Bzip2/t/99pod.t
ext/Compress-Raw-Bzip2/typemap
ext/Compress-Raw-Zlib/Changes Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/01version.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/02zlib.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/07bufsize.t Compress::Raw::Zlib
+ext/Compress-Raw-Zlib/t/09limitoutput.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/t/18lvalue.t Compress::Raw::Zlib
ext/Compress-Raw-Zlib/typemap Compress::Raw::Zlib
ext/Compress-Raw-Zlib/zlib-src/adler32.c Compress::Raw::Zlib
int flags ;
#define FLAG_APPEND_OUTPUT 1
#define FLAG_CONSUME_INPUT 8
+#define FLAG_LIMIT_OUTPUT 16
bz_stream stream;
uInt bufsize;
int last_error ;
printf("DispStream 0x%p", s) ;
if (message)
- printf("- %s \n", message) ;
+ printf(" - %s \n", message) ;
printf("\n") ;
if (!s) {
else {
printf(" stream 0x%p\n", &(s->stream));
printf(" opaque 0x%p\n", s->stream.opaque);
+ printf(" state 0x%p\n", s->stream.state );
printf(" next_in 0x%p", s->stream.next_in);
if (s->stream.next_in){
printf(" =>");
printf(" avail_in %lu\n", (unsigned long)s->stream.avail_in);
printf(" avail_out %lu\n", (unsigned long)s->stream.avail_out);
printf(" bufsize %lu\n", (unsigned long)s->bufsize);
+ printf(" total_in_lo32 %u\n", s->stream.total_in_lo32);
+ printf(" total_in_hi32 %u\n", s->stream.total_in_hi32);
+ printf(" total_out_lo32 %u\n", s->stream.total_out_lo32);
+ printf(" total_out_hi32 %u\n", s->stream.total_out_hi32);
printf(" flags 0x%x\n", s->flags);
printf(" APPEND %s\n", EnDis(FLAG_APPEND_OUTPUT));
printf(" CONSUME %s\n", EnDis(FLAG_CONSUME_INPUT));
+ printf(" LIMIT %s\n", EnDis(FLAG_LIMIT_OUTPUT));
printf("\n");
MODULE = Compress::Raw::Bunzip2 PACKAGE = Compress::Raw::Bunzip2
void
-new(className, appendOut=1 , consume=1, small=0, verbosity=0)
+new(className, appendOut=1 , consume=1, small=0, verbosity=0, limitOutput=0)
const char* className
int appendOut
int consume
int small
int verbosity
+ int limitOutput
PPCODE:
{
int err = BZ_OK ;
flags |= FLAG_APPEND_OUTPUT;
if (consume)
flags |= FLAG_CONSUME_INPUT;
+ if (limitOutput)
+ flags |= (FLAG_LIMIT_OUTPUT|FLAG_CONSUME_INPUT);
PostInitStream(s, flags) ;
}
}
CODE:
bufinc = s->bufsize;
/* If the buffer is a reference, dereference it */
- buf = deRef(buf, "inflate") ;
+ buf = deRef(buf, "bzinflate") ;
if (s->flags & FLAG_CONSUME_INPUT && SvREADONLY(buf))
croak(UNCOMPRESS_CLASS "::bzinflate input parameter cannot be read-only when ConsumeInput is specified");
s->stream.avail_in = SvCUR(buf);
/* and retrieve the output buffer */
- output = deRef_l(output, "inflate") ;
+ output = deRef_l(output, "bzinflate") ;
#ifdef UTF8_AVAILABLE
if (DO_UTF8(output))
out_utf8 = TRUE ;
if((s->flags & FLAG_APPEND_OUTPUT) != FLAG_APPEND_OUTPUT) {
SvCUR_set(output, 0);
}
+#if 1
+ /* Assume no output buffer - the code below will update if there is any available */
+ s->stream.avail_out = 0;
+
+ if (SvLEN(output)) {
+ prefix_length = cur_length = SvCUR(output) ;
+
+ if (s->flags & FLAG_LIMIT_OUTPUT && SvLEN(output) - cur_length - 1 < bufinc)
+ {
+ Sv_Grow(output, bufinc + cur_length + 1) ;
+ }
+
+ /* Only setup the stream output pointers if there is spare
+ capacity in the outout SV
+ */
+ if (SvLEN(output) > cur_length + 1)
+ {
+ s->stream.next_out = (char*) SvPVbyte_nolen(output) + cur_length;
+ increment = SvLEN(output) - cur_length - 1;
+ s->stream.avail_out = increment;
+ }
+ }
+
+ s->bytesInflated = 0;
+
+ RETVAL = BZ_OK;
+#else
+
if (SvLEN(output)) {
prefix_length = cur_length = SvCUR(output) ;
s->stream.next_out = (char*) SvPVbyte_nolen(output) + cur_length;
s->stream.avail_out = 0;
}
s->bytesInflated = 0;
+#endif
while (1) {
if (s->stream.avail_out == 0) {
/* out of space in the output buffer so make it bigger */
- Sv_Grow(output, SvLEN(output) + bufinc) ;
+ Sv_Grow(output, SvLEN(output) + bufinc + 1) ;
cur_length += increment ;
s->stream.next_out = (char*) SvPVbyte_nolen(output) + cur_length ;
increment = bufinc ;
bufinc *= 2 ;
}
+ //DispStream(s, "pre");
RETVAL = BZ2_bzDecompress (&(s->stream));
- if (RETVAL != BZ_OK)
+ //DispStream(s, "apres");
+ if (RETVAL != BZ_OK || s->flags & FLAG_LIMIT_OUTPUT)
break ;
if (s->stream.avail_out == 0)
CHANGES
-------
- 2.018 11 April 2009
+ 2.018 3 May 2009
+
+ * added linitOutput option
* Changes to bzip2 source to get the module to build using a C++
compiler
- Compress-Raw-Bzip2
+ Compress-Raw-Bzip2
- Version 2.018
+ Version 2.018
- 11th April 2009
+ 3rd May 2009
Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
Full source for the bzip2 library is available at
http://www.bzip.org/
+ Note that the files bzip2.c, bzip2recover.c, bzlib.c & decompress.c
+ have been modified to allow them to build with a C++ compiler.
+ The file bzip2-src/bzip2-cpp.patch contains the patch
+ that was used to modify the original source.
+
DESCRIPTION
-----------
If you haven't installed Compress-Raw-Bzip2 then search Compress::Raw::Bzip2.pm
for a line like this:
- $VERSION = "2.017" ;
+ $VERSION = "2.018" ;
c. The version of bzip2 you have used.
If you have successfully installed Compress-Raw-Bzip2, this one-liner
=head1 Uncompression
-=head2 ($z, $status) = new Compress::Raw::Bunzip2 $appendOutput, $consumeInput, $small;
+=head2 ($z, $status) = new Compress::Raw::Bunzip2 $appendOutput, $consumeInput, $small, $limitOutput;
If successful, it will return the initialised uncompression object, C<$z>
and a C<$status> of C<BZ_OK> in a list context. In scalar context it
Defaults to 0.
+=item B<$limitOutput>
+
+The C<LimitOutput> option changes the behavior of the C<< $i->bzinflate >>
+method so that the amount of memory used by the output buffer can be
+limited.
+
+When C<LimitOutput> is used the size of the output buffer used will either
+be the 16k or the amount of memory already allocated to C<$output>,
+whichever is larger. Predicting the output size available is tricky, so
+don't rely on getting an exact output buffer size.
+
+When C<LimitOutout> is not specified C<< $i->bzinflate >> will use as much
+memory as it takes to write all the uncompressed data it creates by
+uncompressing the input buffer.
+
+If C<LimitOutput> is enabled, the C<ConsumeInput> option will also be
+enabled.
+
+This option defaults to false.
+
=back
=head2 $status = $z->bzinflate($input, $output);
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- my $VERSION = '2.017';
+ my $VERSION = '2.018';
my @NAMES = qw(
);
--- /dev/null
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = ("../lib", "lib/compress");
+ }
+}
+
+use lib qw(t t/compress);
+use strict;
+use warnings;
+use bytes;
+
+use Test::More ;
+use CompTestUtils;
+
+BEGIN
+{
+ # use Test::NoWarnings, if available
+ my $extra = 0 ;
+ $extra = 1
+ if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
+
+ plan tests => 88 + $extra ;
+
+ use_ok('Compress::Raw::Bzip2') ;
+}
+
+
+
+my $hello = "I am a HAL 9000 computer" x 2001;
+my $tmp = $hello ;
+
+my ($err, $x, $X, $status);
+
+ok( ($x, $err) = new Compress::Raw::Bzip2 (1));
+ok $x ;
+cmp_ok $err, '==', BZ_OK, " status is BZ_OK" ;
+
+my $out ;
+$status = $x->bzdeflate($tmp, $out) ;
+cmp_ok $status, '==', BZ_RUN_OK, " status is BZ_RUN_OK" ;
+
+cmp_ok $x->bzclose($out), '==', BZ_STREAM_END, " bzflush returned BZ_STREAM_END" ;
+
+{
+ my $t = $out;
+ my $b = new Compress::Raw::Bunzip2(0,0);
+
+ my $GOT;
+ my $status = $b->bzinflate($t, $GOT) ;
+ cmp_ok $status, "==", BZ_STREAM_END;
+ ok $GOT eq $hello;
+
+}
+
+sub getOut { my $x = ''; return \$x }
+
+for my $bufsize (1, 2, 3, 13, 4096, 1024*10)
+{
+ print "#\n#Bufsize $bufsize\n#\n";
+ $tmp = $out;
+
+ my $k;
+ ok(($k, $err) = new Compress::Raw::Bunzip2( 1,1,0,0,1
+ #AppendOutput => 1,
+ #LimitOutput => 1,
+ #Bufsize => $bufsize
+ ));
+ ok $k ;
+ cmp_ok $err, '==', BZ_OK, " status is BZ_OK" ;
+
+ is $k->total_in_lo32(), 0, " total_in_lo32 == 0" ;
+ is $k->total_out_lo32(), 0, " total_out_lo32 == 0" ;
+ my $GOT = getOut();
+ my $prev;
+ my $deltaOK = 1;
+ my $looped = 0;
+ while (length $tmp)
+ {
+ ++ $looped;
+ my $prev = length $GOT;
+ $status = $k->bzinflate($tmp, $GOT) ;
+ last if $status != BZ_OK;
+ $deltaOK = 0 if length($GOT) - $prev > $bufsize;
+ }
+
+ ok $deltaOK, " Output Delta never > $bufsize";
+ cmp_ok $looped, '>=', 1, " looped $looped";
+ is length($tmp), 0, " length of input buffer is zero";
+
+ cmp_ok $status, "==", BZ_STREAM_END, " status is BZ_STREAM_END" ;
+ ok $$GOT eq $hello, " got expected output" ;
+ is $k->total_in_lo32(), length $out, " length total_in_lo32 ok" ;
+ is $k->total_out_lo32(), length $hello, " length total_out_lo32 ok " . $k->total_out_lo32() ;
+}
+
+sub getit
+{
+ my $obj = shift ;
+ my $input = shift;
+
+ my $data ;
+ 1 while $obj->bzinflate($input, $data) != BZ_STREAM_END ;
+ return \$data ;
+}
+
+{
+ title "regression test";
+
+ my ($err, $x, $X, $status);
+
+ ok( ($x, $err) = new Compress::Raw::Bzip2 (1));
+ ok $x ;
+ cmp_ok $err, '==', BZ_OK, " status is BZ_OK" ;
+
+ my $line1 = ("abcdefghijklmnopq" x 1000) . "\n" ;
+ my $line2 = "second line\n" ;
+ my $text = $line1 . $line2 ;
+ my $tmp = $text;
+
+ my $out ;
+ $status = $x->bzdeflate($tmp, $out) ;
+ cmp_ok $status, '==', BZ_RUN_OK, " status is BZ_RUN_OK" ;
+
+ cmp_ok $x->bzclose($out), '==', BZ_STREAM_END, " bzclose returned BZ_STREAM_END" ;
+
+ my $k;
+ ok(($k, $err) = new Compress::Raw::Bunzip2( 1,1,0,0,1
+ #AppendOutput => 1,
+ #LimitOutput => 1
+ ));
+
+
+ my $c = getit($k, $out);
+ is $$c, $text;
+
+
+}
+
CHANGES
-------
+ 2.018 3 May 2009
+
+ * No Changes
+
2.017 28 March 2009
* Added 'LimitOutput' option
Compress-Raw-Zlib
- Version 2.017
+ Version 2.018
- 28th March 2009
+ 3rd May 2009
Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
If you haven't installed Compress-Raw-Zlib then search Compress::Raw::Zlib.pm
for a line like this:
- $VERSION = "2.017" ;
+ $VERSION = "2.018" ;
c. The version of zlib you have used.
If you have successfully installed Compress-Raw-Zlib, this one-liner
use bytes ;
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
-$VERSION = '2.017';
+$VERSION = '2.018';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
--- /dev/null
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = ("../lib", "lib/compress");
+ }
+}
+
+use lib qw(t t/compress);
+use strict;
+use warnings;
+use bytes;
+
+use Test::More ;
+use CompTestUtils;
+
+BEGIN
+{
+ # use Test::NoWarnings, if available
+ my $extra = 0 ;
+ $extra = 1
+ if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
+
+ plan tests => 98 + $extra ;
+
+ use_ok('Compress::Raw::Zlib', 2) ;
+}
+
+
+
+my $hello = "I am a HAL 9000 computer" x 2001;
+my $tmp = $hello ;
+
+my ($err, $x, $X, $status);
+
+ok( ($x, $err) = new Compress::Raw::Zlib::Deflate (-AppendOutput => 1));
+ok $x ;
+cmp_ok $err, '==', Z_OK, " status is Z_OK" ;
+
+my $out ;
+$status = $x->deflate($tmp, $out) ;
+cmp_ok $status, '==', Z_OK, " status is Z_OK" ;
+
+cmp_ok $x->flush($out), '==', Z_OK, " flush returned Z_OK" ;
+
+
+sub getOut { my $x = ''; return \$x }
+
+for my $bufsize (1, 2, 3, 13, 4096, 1024*10)
+{
+ print "#\n#Bufsize $bufsize\n#\n";
+ $tmp = $out;
+
+ my $k;
+ ok(($k, $err) = new Compress::Raw::Zlib::Inflate( AppendOutput => 1,
+ LimitOutput => 1,
+ Bufsize => $bufsize
+ ));
+ ok $k ;
+ cmp_ok $err, '==', Z_OK, " status is Z_OK" ;
+
+ ok ! defined $k->msg(), " no msg" ;
+ is $k->total_in(), 0, " total_in == 0" ;
+ is $k->total_out(), 0, " total_out == 0" ;
+ my $GOT = getOut();
+ my $prev;
+ my $deltaOK = 1;
+ my $looped = 0;
+ while (length $tmp)
+ {
+ ++ $looped;
+ my $prev = length $GOT;
+ $status = $k->inflate($tmp, $GOT) ;
+ last if $status == Z_STREAM_END || $status == Z_DATA_ERROR || $status == Z_STREAM_ERROR ;
+ $deltaOK = 0 if length($GOT) - $prev > $bufsize;
+ }
+
+ ok $deltaOK, " Output Delta never > $bufsize";
+ cmp_ok $looped, '>=', 1, " looped $looped";
+ is length($tmp), 0, " length of input buffer is zero";
+
+ cmp_ok $status, '==', Z_STREAM_END, " status is Z_STREAM_END" ;
+ is $$GOT, $hello, " got expected output" ;
+ ok ! defined $k->msg(), " no msg" ;
+ is $k->total_in(), length $out, " length total_in ok" ;
+ is $k->total_out(), length $hello, " length total_out ok " . $k->total_out() ;
+}
+
+sub getit
+{
+ my $obj = shift ;
+ my $input = shift;
+
+ my $data ;
+ 1 while $obj->inflate($input, $data) != Z_STREAM_END ;
+ return \$data ;
+}
+
+{
+ title "regression test";
+
+ my ($err, $x, $X, $status);
+
+ ok( ($x, $err) = new Compress::Raw::Zlib::Deflate (-AppendOutput => 1));
+ ok $x ;
+ cmp_ok $err, '==', Z_OK, " status is Z_OK" ;
+
+ my $line1 = ("abcdefghijklmnopq" x 1000) . "\n" ;
+ my $line2 = "second line\n" ;
+ my $text = $line1 . $line2 ;
+ my $tmp = $text;
+
+ my $out ;
+ $status = $x->deflate($tmp, $out) ;
+ cmp_ok $status, '==', Z_OK, " status is Z_OK" ;
+
+ cmp_ok $x->flush($out), '==', Z_OK, " flush returned Z_OK" ;
+
+ my $k;
+ ok(($k, $err) = new Compress::Raw::Zlib::Inflate( AppendOutput => 1,
+ LimitOutput => 1
+ ));
+
+
+ my $c = getit($k, $out);
+ is $$c, $text;
+
+
+}
+
CHANGES
-------
+ 2.018 3 May 2009
+
+ * IO::Unompress::Bunzip2
+ - The interface to Compress-Raw-Bzip2 now uses the new LimitOutput
+ feature. This will make all of the bzip2-related IO-Compress modules
+ less greedy in their memory consumption.
+
+ * IO::Compress::Zip
+ - Fixed exTime & exUnix2
+
+ - Fixed 'Use of uninitialized value in pack' warning when using
+ ZIP_CM_STORE.
+
2.017 30 March 2009
* Merged IO-Compress-Base, IO-Compress-Bzip2, IO-Compress-Zlib &
use strict ;
require 5.004 ;
-$::VERSION = '2.017' ;
+$::VERSION = '2.018' ;
use private::MakeUtil;
use ExtUtils::MakeMaker 5.16 ;
- IO-Compress
+ IO-Compress
- Version 2.017
+ Version 2.018
- 28th March 2009
+ 3rd May 2009
Copyright (c) 1995-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
If you haven't installed IO-Compress then search IO::Compress::Gzip.pm
for a line like this:
- $VERSION = "2.017" ;
+ $VERSION = "2.018" ;
2. If you are having problems building IO-Compress, send me a
complete log of what happened. Start by unpacking the IO-Compress
use IO::Handle ;
use Scalar::Util qw(dualvar);
-use IO::Compress::Base::Common 2.017 ;
-use Compress::Raw::Zlib 2.017 ;
-use IO::Compress::Gzip 2.017 ;
-use IO::Uncompress::Gunzip 2.017 ;
+use IO::Compress::Base::Common 2.018 ;
+use Compress::Raw::Zlib 2.018 ;
+use IO::Compress::Gzip 2.018 ;
+use IO::Uncompress::Gunzip 2.018 ;
use strict ;
use warnings ;
use bytes ;
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
-$VERSION = '2.017';
+$VERSION = '2.018';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
package Compress::Zlib ;
-use IO::Compress::Gzip::Constants 2.017 ;
+use IO::Compress::Gzip::Constants 2.018 ;
sub memGzip($)
{
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
+use IO::Compress::Base::Common 2.018 qw(:Status);
#use Compress::Bzip2 ;
-use Compress::Raw::Bzip2 2.017 ;
+use Compress::Raw::Bzip2 2.018 ;
our ($VERSION);
-$VERSION = '2.017';
+$VERSION = '2.018';
sub mkCompObject
{
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
+use IO::Compress::Base::Common 2.018 qw(:Status);
-use Compress::Raw::Zlib 2.017 qw(Z_OK Z_FINISH MAX_WBITS) ;
+use Compress::Raw::Zlib 2.018 qw(Z_OK Z_FINISH MAX_WBITS) ;
our ($VERSION);
-$VERSION = '2.017';
+$VERSION = '2.018';
sub mkCompObject
{
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
+use IO::Compress::Base::Common 2.018 qw(:Status);
our ($VERSION);
-$VERSION = '2.017';
+$VERSION = '2.018';
sub mkCompObject
{
use strict ;
use warnings;
-use IO::Compress::Base::Common 2.017 ;
+use IO::Compress::Base::Common 2.018 ;
use IO::File ;
use Scalar::Util qw(blessed readonly);
our (@ISA, $VERSION);
@ISA = qw(Exporter IO::File);
-$VERSION = '2.017';
+$VERSION = '2.018';
#Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16.
require Exporter;
our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE);
@ISA = qw(Exporter);
-$VERSION = '2.017';
+$VERSION = '2.018';
@EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput
isaFileGlobString cleanFileGlobString oneTarget
use bytes;
require Exporter ;
-use IO::Compress::Base 2.017 ;
+use IO::Compress::Base 2.018 ;
-use IO::Compress::Base::Common 2.017 qw(createSelfTiedObject);
-use IO::Compress::Adapter::Bzip2 2.017 ;
+use IO::Compress::Base::Common 2.018 qw(createSelfTiedObject);
+use IO::Compress::Adapter::Bzip2 2.018 ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error);
-$VERSION = '2.017';
+$VERSION = '2.018';
$Bzip2Error = '';
@ISA = qw(Exporter IO::Compress::Base);
{
my $self = shift ;
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return (
'BlockSize100K' => [0, 1, Parse_unsigned, 1],
require Exporter ;
-use IO::Compress::RawDeflate 2.017 ;
+use IO::Compress::RawDeflate 2.018 ;
-use Compress::Raw::Zlib 2.017 ;
-use IO::Compress::Zlib::Constants 2.017 ;
-use IO::Compress::Base::Common 2.017 qw(createSelfTiedObject);
+use Compress::Raw::Zlib 2.018 ;
+use IO::Compress::Zlib::Constants 2.018 ;
+use IO::Compress::Base::Common 2.018 qw(createSelfTiedObject);
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$DeflateError = '';
@ISA = qw(Exporter IO::Compress::RawDeflate);
use bytes;
-use IO::Compress::RawDeflate 2.017 ;
+use IO::Compress::RawDeflate 2.018 ;
-use Compress::Raw::Zlib 2.017 ;
-use IO::Compress::Base::Common 2.017 qw(:Status :Parse createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.017 ;
-use IO::Compress::Zlib::Extra 2.017 ;
+use Compress::Raw::Zlib 2.018 ;
+use IO::Compress::Base::Common 2.018 qw(:Status :Parse createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.018 ;
+use IO::Compress::Zlib::Extra 2.018 ;
BEGIN
{
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$GzipError = '' ;
@ISA = qw(Exporter IO::Compress::RawDeflate);
our ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names);
our ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE);
-$VERSION = '2.017';
+$VERSION = '2.018';
@ISA = qw(Exporter);
use bytes;
-use IO::Compress::Base 2.017 ;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Compress::Adapter::Deflate 2.017 ;
+use IO::Compress::Base 2.018 ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
+use IO::Compress::Adapter::Deflate 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$RawDeflateError = '';
@ISA = qw(Exporter IO::Compress::Base);
{
my $self = shift ;
- use IO::Compress::Base::Common 2.017 qw(:Parse);
- use Compress::Raw::Zlib 2.017 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
+ use Compress::Raw::Zlib 2.018 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
return (
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Compress::RawDeflate 2.017 ;
-use IO::Compress::Adapter::Deflate 2.017 ;
-use IO::Compress::Adapter::Identity 2.017 ;
-use IO::Compress::Zlib::Extra 2.017 ;
-use IO::Compress::Zip::Constants 2.017 ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
+use IO::Compress::RawDeflate 2.018 ;
+use IO::Compress::Adapter::Deflate 2.018 ;
+use IO::Compress::Adapter::Identity 2.018 ;
+use IO::Compress::Zlib::Extra 2.018 ;
+use IO::Compress::Zip::Constants 2.018 ;
-use Compress::Raw::Zlib 2.017 qw(crc32) ;
+use Compress::Raw::Zlib 2.018 qw(crc32) ;
BEGIN
{
eval { require IO::Compress::Adapter::Bzip2 ;
- import IO::Compress::Adapter::Bzip2 2.017 ;
+ import IO::Compress::Adapter::Bzip2 2.018 ;
require IO::Compress::Bzip2 ;
- import IO::Compress::Bzip2 2.017 ;
+ import IO::Compress::Bzip2 2.018 ;
} ;
# eval { require IO::Compress::Adapter::Lzma ;
-# import IO::Compress::Adapter::Lzma 2.017 ;
+# import IO::Compress::Adapter::Lzma 2.018 ;
# require IO::Compress::Lzma ;
-# import IO::Compress::Lzma 2.017 ;
+# import IO::Compress::Lzma 2.018 ;
# } ;
}
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZipError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$ZipError = '';
@ISA = qw(Exporter IO::Compress::RawDeflate);
$got->value('Level'),
$got->value('Strategy')
);
+ *$self->{ZipData}{CRC32} = crc32(undef);
}
elsif (*$self->{ZipData}{Method} == ZIP_CM_DEFLATE) {
($obj, $errstr, $errno) = IO::Compress::Adapter::Deflate::mkCompObject(
$got->value('Time' => time) ;
}
- if (! $got->parsed('exTime') ) {
+ if ($got->parsed('exTime') ) {
my $timeRef = $got->value('exTime');
if ( defined $timeRef) {
return $self->saveErrorString(undef, "exTime not a 3-element array ref")
}
# Unix2 Extended Attribute
- if (! $got->parsed('exUnix2') ) {
+ if ($got->parsed('exUnix2') ) {
my $timeRef = $got->value('exUnix2');
if ( defined $timeRef) {
return $self->saveErrorString(undef, "exUnix2 not a 2-element array ref")
{
my $self = shift ;
- use IO::Compress::Base::Common 2.017 qw(:Parse);
- use Compress::Raw::Zlib 2.017 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
+ use Compress::Raw::Zlib 2.018 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
my @Bzip2 = ();
$params->value('MTime' => $mtime) ;
$params->value('ATime' => $atime) ;
$params->value('CTime' => undef) ; # No Creation time
+ $params->value("exTime", [$mtime, $atime, undef]);
}
# NOTE - Unix specific code alert
our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS);
-$VERSION = '2.017';
+$VERSION = '2.018';
@ISA = qw(Exporter);
ZIP_EXTRA_ID_ZIP64
ZIP_EXTRA_ID_EXT_TIMESTAMP
ZIP_EXTRA_ID_INFO_ZIP_UNIX2
+ ZIP_EXTRA_ID_INFO_ZIP_UNIXn
+ ZIP_EXTRA_ID_JAVA_EXE
ZIP_OS_CODE_UNIX
ZIP_OS_CODE_DEFAULT
our ($VERSION, @ISA, @EXPORT);
-$VERSION = '2.017';
+$VERSION = '2.018';
@ISA = qw(Exporter);
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = '2.017';
+$VERSION = '2.018';
-use IO::Compress::Gzip::Constants 2.017 ;
+use IO::Compress::Gzip::Constants 2.018 ;
sub ExtraFieldError
{
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
+use IO::Compress::Base::Common 2.018 qw(:Status);
#use Compress::Bzip2 ;
-use Compress::Raw::Bzip2 2.017 ;
+use Compress::Raw::Bzip2 2.018 ;
our ($VERSION, @ISA);
-$VERSION = '2.017';
+$VERSION = '2.018';
#@ISA = qw( Compress::Raw::Bunzip2 );
#my ($inflate, $status) = bzinflateInit;
#Small => $params->value('Small');
- my ($inflate, $status) = new Compress::Raw::Bunzip2(1, 1, $small, $verbosity);
+ my ($inflate, $status) = new Compress::Raw::Bunzip2(1, 1, $small, $verbosity, 1);
return (undef, "Could not create Inflation object: $status", $status)
if $status != BZ_OK ;
use strict;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
+use IO::Compress::Base::Common 2.018 qw(:Status);
our ($VERSION);
-$VERSION = '2.017';
+$VERSION = '2.018';
-use Compress::Raw::Zlib 2.017 ();
+use Compress::Raw::Zlib 2.018 ();
sub mkUncompObject
{
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status);
-use Compress::Raw::Zlib 2.017 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
+use IO::Compress::Base::Common 2.018 qw(:Status);
+use Compress::Raw::Zlib 2.018 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
our ($VERSION);
-$VERSION = '2.017';
+$VERSION = '2.018';
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(createSelfTiedObject);
+use IO::Compress::Base::Common 2.018 qw(createSelfTiedObject);
-use IO::Uncompress::Adapter::Inflate 2.017 ();
+use IO::Uncompress::Adapter::Inflate 2.018 ();
-use IO::Uncompress::Base 2.017 ;
-use IO::Uncompress::Gunzip 2.017 ;
-use IO::Uncompress::Inflate 2.017 ;
-use IO::Uncompress::RawInflate 2.017 ;
-use IO::Uncompress::Unzip 2.017 ;
+use IO::Uncompress::Base 2.018 ;
+use IO::Uncompress::Gunzip 2.018 ;
+use IO::Uncompress::Inflate 2.018 ;
+use IO::Uncompress::RawInflate 2.018 ;
+use IO::Uncompress::Unzip 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$AnyInflateError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
sub getExtraParams
{
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ;
}
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(createSelfTiedObject);
+use IO::Compress::Base::Common 2.018 qw(createSelfTiedObject);
-use IO::Uncompress::Base 2.017 ;
+use IO::Uncompress::Base 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$AnyUncompressError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
BEGIN
{
- eval ' use IO::Uncompress::Adapter::Inflate 2.017 ;';
- eval ' use IO::Uncompress::Adapter::Bunzip2 2.017 ;';
- eval ' use IO::Uncompress::Adapter::LZO 2.017 ;';
- eval ' use IO::Uncompress::Adapter::Lzf 2.017 ;';
- #eval ' use IO::Uncompress::Adapter::UnLzma 2.017 ;';
-
- eval ' use IO::Uncompress::Bunzip2 2.017 ;';
- eval ' use IO::Uncompress::UnLzop 2.017 ;';
- eval ' use IO::Uncompress::Gunzip 2.017 ;';
- eval ' use IO::Uncompress::Inflate 2.017 ;';
- eval ' use IO::Uncompress::RawInflate 2.017 ;';
- eval ' use IO::Uncompress::Unzip 2.017 ;';
- eval ' use IO::Uncompress::UnLzf 2.017 ;';
- #eval ' use IO::Uncompress::UnLzma 2.017 ;';
+ eval ' use IO::Uncompress::Adapter::Inflate 2.018 ;';
+ eval ' use IO::Uncompress::Adapter::Bunzip2 2.018 ;';
+ eval ' use IO::Uncompress::Adapter::LZO 2.018 ;';
+ eval ' use IO::Uncompress::Adapter::Lzf 2.018 ;';
+ #eval ' use IO::Uncompress::Adapter::UnLzma 2.018 ;';
+
+ eval ' use IO::Uncompress::Bunzip2 2.018 ;';
+ eval ' use IO::Uncompress::UnLzop 2.018 ;';
+ eval ' use IO::Uncompress::Gunzip 2.018 ;';
+ eval ' use IO::Uncompress::Inflate 2.018 ;';
+ eval ' use IO::Uncompress::RawInflate 2.018 ;';
+ eval ' use IO::Uncompress::Unzip 2.018 ;';
+ eval ' use IO::Uncompress::UnLzf 2.018 ;';
+ #eval ' use IO::Uncompress::UnLzma 2.018 ;';
}
sub new
sub getExtraParams
{
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ;
}
@ISA = qw(Exporter IO::File);
-$VERSION = '2.017';
+$VERSION = '2.018';
use constant G_EOF => 0 ;
use constant G_ERR => -1 ;
-use IO::Compress::Base::Common 2.017 ;
+use IO::Compress::Base::Common 2.018 ;
#use Parse::Parameters ;
use IO::File ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Base 2.017 ;
-use IO::Uncompress::Adapter::Bunzip2 2.017 ;
+use IO::Uncompress::Base 2.018 ;
+use IO::Uncompress::Adapter::Bunzip2 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error);
-$VERSION = '2.017';
+$VERSION = '2.018';
$Bunzip2Error = '';
@ISA = qw( Exporter IO::Uncompress::Base );
{
my $self = shift ;
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return (
'Verbosity' => [1, 1, Parse_boolean, 0],
use warnings;
use bytes;
-use IO::Uncompress::RawInflate 2.017 ;
+use IO::Uncompress::RawInflate 2.018 ;
-use Compress::Raw::Zlib 2.017 qw( crc32 ) ;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.017 ;
-use IO::Compress::Zlib::Extra 2.017 ;
+use Compress::Raw::Zlib 2.018 qw( crc32 ) ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.018 ;
+use IO::Compress::Zlib::Extra 2.018 ;
require Exporter ;
$GunzipError = '';
-$VERSION = '2.017';
+$VERSION = '2.018';
sub new
{
sub getExtraParams
{
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return ( 'ParseExtra' => [1, 1, Parse_boolean, 0] ) ;
}
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Compress::Zlib::Constants 2.017 ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
+use IO::Compress::Zlib::Constants 2.018 ;
-use IO::Uncompress::RawInflate 2.017 ;
+use IO::Uncompress::RawInflate 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$InflateError = '';
@ISA = qw( Exporter IO::Uncompress::RawInflate );
use warnings;
use bytes;
-use Compress::Raw::Zlib 2.017 ;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
+use Compress::Raw::Zlib 2.018 ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Base 2.017 ;
-use IO::Uncompress::Adapter::Inflate 2.017 ;
+use IO::Uncompress::Base 2.018 ;
+use IO::Uncompress::Adapter::Inflate 2.018 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError);
-$VERSION = '2.017';
+$VERSION = '2.018';
$RawInflateError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
use warnings;
use bytes;
-use IO::Uncompress::RawInflate 2.017 ;
-use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Adapter::Inflate 2.017 ;
-use IO::Uncompress::Adapter::Identity 2.017 ;
-use IO::Compress::Zlib::Extra 2.017 ;
-use IO::Compress::Zip::Constants 2.017 ;
+use IO::Uncompress::RawInflate 2.018 ;
+use IO::Compress::Base::Common 2.018 qw(:Status createSelfTiedObject);
+use IO::Uncompress::Adapter::Inflate 2.018 ;
+use IO::Uncompress::Adapter::Identity 2.018 ;
+use IO::Compress::Zlib::Extra 2.018 ;
+use IO::Compress::Zip::Constants 2.018 ;
-use Compress::Raw::Zlib 2.017 qw(crc32) ;
+use Compress::Raw::Zlib 2.018 qw(crc32) ;
BEGIN
{
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup);
-$VERSION = '2.017';
+$VERSION = '2.018';
$UnzipError = '';
@ISA = qw(Exporter IO::Uncompress::RawInflate);
sub getExtraParams
{
- use IO::Compress::Base::Common 2.017 qw(:Parse);
+ use IO::Compress::Base::Common 2.018 qw(:Parse);
return (
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- my $VERSION = '2.017';
+ my $VERSION = '2.018';
my @NAMES = qw(
Compress::Raw::Bzip2
Compress::Raw::Zlib
$extra = 1
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- plan tests => 2316 + $extra;
+ plan tests => 2404 + $extra;
};