X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FCompress%2FIO%2FZlib%2Flib%2FIO%2FUncompress%2FInflate.pm;h=1435321882eb70a37377b924570044da09827ee9;hb=6ecef415672954d64bc0df6bdb809cebe10f89d4;hp=d3efef615fef2f5c6fd81ebe7de06dd40e33e43b;hpb=2b4e0969009806e4e03a23b007570fa5279be8e0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Compress/IO/Zlib/lib/IO/Uncompress/Inflate.pm b/ext/Compress/IO/Zlib/lib/IO/Uncompress/Inflate.pm index d3efef6..1435321 100644 --- a/ext/Compress/IO/Zlib/lib/IO/Uncompress/Inflate.pm +++ b/ext/Compress/IO/Zlib/lib/IO/Uncompress/Inflate.pm @@ -13,7 +13,7 @@ use IO::Uncompress::RawInflate ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.000_11'; +$VERSION = '2.000_13'; $InflateError = ''; @ISA = qw( Exporter IO::Uncompress::RawInflate ); @@ -203,7 +203,8 @@ IO::Uncompress::Inflate - Read RFC 1950 files/buffers $status = $z->inflateSync() - $z->trailingData() + $data = $z->trailingData() + $status = $z->nextStream() $data = $z->getHeaderInfo() $z->tell() $z->seek($position, $whence) @@ -386,9 +387,13 @@ If the C<$output> parameter is any other type, C will be returned. =head2 Notes -When C<$input> maps to multiple files/buffers and C<$output> is a single -file/buffer the uncompressed input files/buffers will all be stored -in C<$output> as a single uncompressed stream. + +When C<$input> maps to multiple compressed files/buffers and C<$output> is +a single file/buffer, after uncompression C<$output> will contain a +concatenation of all the uncompressed data from each of the input +files/buffers. + + @@ -400,7 +405,7 @@ L section below. =over 5 -=item AutoClose =E 0|1 +=item C<< AutoClose => 0|1 >> This option applies to any input or output data streams to C that are filehandles. @@ -412,8 +417,7 @@ completed. This parameter defaults to 0. - -=item BinModeOut =E 0|1 +=item C<< BinModeOut => 0|1 >> When writing to a file or filehandle, set C before writing to the file. @@ -424,15 +428,16 @@ Defaults to 0. -=item -Append =E 0|1 +=item C<< Append => 0|1 >> TODO -=item -MultiStream =E 0|1 +=item C<< MultiStream => 0|1 >> -Creates a new stream after each file. +If the input file/buffer contains multiple compressed data streams, this +option will uncompress the whole lot as a single data stream. -Defaults to 1. +Defaults to 0. @@ -554,7 +559,7 @@ OPTS is a combination of the following options: =over 5 -=item -AutoClose =E 0|1 +=item C<< AutoClose => 0|1 >> This option is only valid when the C<$input> parameter is a filehandle. If specified, and the value is true, it will result in the file being closed once @@ -563,7 +568,7 @@ destroyed. This parameter defaults to 0. -=item -MultiStream =E 0|1 +=item C<< MultiStream => 0|1 >> @@ -576,8 +581,7 @@ start of another stream. This parameter defaults to 0. - -=item -Prime =E $string +=item C<< Prime => $string >> This option will uncompress the contents of C<$string> before processing the input file/buffer. @@ -588,21 +592,21 @@ data begins without having to read the first few bytes. If this is the case, the uncompression can be I with these bytes using this option. -=item -Transparent =E 0|1 +=item C<< Transparent => 0|1 >> If this option is set and the input file or buffer is not compressed data, the module will allow reading of it anyway. This option defaults to 1. -=item -BlockSize =E $num +=item C<< BlockSize => $num >> When reading the compressed input data, IO::Uncompress::Inflate will read it in blocks of C<$num> bytes. This option defaults to 4096. -=item -InputLength =E $size +=item C<< InputLength => $size >> When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the @@ -618,7 +622,7 @@ compressed data stream. This option defaults to off. -=item -Append =E 0|1 +=item C<< Append => 0|1 >> This option controls what the C method does with uncompressed data. @@ -630,7 +634,7 @@ will be overwritten by the uncompressed data. Defaults to 0. -=item -Strict =E 0|1 +=item C<< Strict => 0|1 >> @@ -896,6 +900,27 @@ underlying file will also be closed. +=head2 nextStream + +Usage is + + my $status = $z->nextStream(); + +Skips to the next compressed data stream in the input file/buffer. If a new +compressed data stream is found, the eof marker will be cleared, C<$.> will +be reset to 0. + +Returns 1 if a new stream was found, 0 if none was found, and -1 if an +error was encountered. + +=head2 trailingData + +Usage is + + my $data = $z->trailingData(); + +Returns any data that + =head1 Importing No symbolic constants are required by this IO::Uncompress::Inflate at present.