Update Compression modules to version 2.009
[p5sagit/p5-mst-13.2.git] / ext / IO_Compress_Zlib / lib / IO / Uncompress / Gunzip.pm
index 5ea345d..4e69be1 100644 (file)
@@ -9,12 +9,12 @@ use strict ;
 use warnings;
 use bytes;
 
-use IO::Uncompress::RawInflate 2.008 ;
+use IO::Uncompress::RawInflate 2.009 ;
 
-use Compress::Raw::Zlib 2.008 qw( crc32 ) ;
-use IO::Compress::Base::Common 2.008 qw(:Status createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.008 ;
-use IO::Compress::Zlib::Extra 2.008 ;
+use Compress::Raw::Zlib 2.009 qw( crc32 ) ;
+use IO::Compress::Base::Common 2.009 qw(:Status createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.009 ;
+use IO::Compress::Zlib::Extra 2.009 ;
 
 require Exporter ;
 
@@ -28,7 +28,7 @@ Exporter::export_ok_tags('all');
 
 $GunzipError = '';
 
-$VERSION = '2.008';
+$VERSION = '2.009';
 
 sub new
 {
@@ -47,7 +47,7 @@ sub gunzip
 
 sub getExtraParams
 {
-    use IO::Compress::Base::Common  2.008 qw(:Parse);
+    use IO::Compress::Base::Common  2.009 qw(:Parse);
     return ( 'ParseExtra' => [1, 1, Parse_boolean,  0] ) ;
 }
 
@@ -278,12 +278,8 @@ __END__
 
 =head1 NAME
 
-
-
 IO::Uncompress::Gunzip - Read RFC 1952 files/buffers
 
-
-
 =head1 SYNOPSIS
 
     use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ;
@@ -329,20 +325,13 @@ IO::Uncompress::Gunzip - Read RFC 1952 files/buffers
     eof($z)
     close($z)
 
-
 =head1 DESCRIPTION
 
-
-
 This module provides a Perl interface that allows the reading of
 files/buffers that conform to RFC 1952.
 
 For writing RFC 1952 files/buffers, see the companion module IO::Compress::Gzip.
 
-
-
-
-
 =head1 Functional Interface
 
 A top-level function, C<gunzip>, is provided to carry out
@@ -355,14 +344,10 @@ section.
     gunzip $input => $output [,OPTS] 
         or die "gunzip failed: $GunzipError\n";
 
-
-
 The functional interface needs Perl5.005 or better.
 
-
 =head2 gunzip $input => $output [, OPTS]
 
-
 C<gunzip> expects at least two parameters, C<$input> and C<$output>.
 
 =head3 The C<$input> parameter
@@ -401,8 +386,6 @@ The input data will be read from each file in turn.
 The complete array will be walked to ensure that it only
 contains valid filenames before any data is uncompressed.
 
-
-
 =item An Input FileGlob string
 
 If C<$input> is a string that is delimited by the characters "<" and ">"
@@ -413,13 +396,10 @@ If the fileglob does not match any files ...
 
 See L<File::GlobMapper|File::GlobMapper> for more details.
 
-
 =back
 
 If the C<$input> parameter is any other type, C<undef> will be returned.
 
-
-
 =head3 The C<$output> parameter
 
 The parameter C<$output> is used to control the destination of the
@@ -439,14 +419,11 @@ If the C<$output> parameter is a filehandle, the uncompressed data
 will be written to it.
 The string '-' can be used as an alias for standard output.
 
-
 =item A scalar reference 
 
 If C<$output> is a scalar reference, the uncompressed data will be
 stored in C<$$output>.
 
-
-
 =item An Array Reference
 
 If C<$output> is an array reference, the uncompressed data will be
@@ -465,20 +442,13 @@ string. Anything else is an error.
 
 If the C<$output> parameter is any other type, C<undef> will be returned.
 
-
-
 =head2 Notes
 
-
 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.
 
-
-
-
-
 =head2 Optional Parameters
 
 Unless specified below, the optional parameters for C<gunzip>,
@@ -498,7 +468,6 @@ completed.
 
 This parameter defaults to 0.
 
-
 =item C<< BinModeOut => 0|1 >>
 
 When writing to a file or filehandle, set C<binmode> before writing to the
@@ -506,26 +475,17 @@ file.
 
 Defaults to 0.
 
-
-
-
-
 =item C<< Append => 0|1 >>
 
 TODO
 
 =item C<< MultiStream => 0|1 >>
 
-
 If the input file/buffer contains multiple compressed data streams, this
 option will uncompress the whole lot as a single data stream.
 
 Defaults to 0.
 
-
-
-
-
 =item C<< TrailingData => $scalar >>
 
 Returns the data, if any, that is present immediately after the compressed
@@ -545,19 +505,12 @@ of the input file.
 
 Don't bother using C<trailingData> if the input is a filename.
 
-
-
 If you know the length of the compressed data stream before you start
 uncompressing, you can avoid having to use C<trailingData> by setting the
 C<InputLength> option.
 
-
-
 =back
 
-
-
-
 =head2 Examples
 
 To read the contents of the file C<file1.txt.gz> and write the
@@ -572,7 +525,6 @@ compressed data to the file C<file1.txt>.
     gunzip $input => $output
         or die "gunzip failed: $GunzipError\n";
 
-
 To read from an existing Perl filehandle, C<$input>, and write the
 uncompressed data to a buffer, C<$buffer>.
 
@@ -616,7 +568,6 @@ and if you want to compress each file one at a time, this will do the trick
 
 The format of the constructor for IO::Uncompress::Gunzip is shown below
 
-
     my $z = new IO::Uncompress::Gunzip $input [OPTS]
         or die "IO::Uncompress::Gunzip failed: $GunzipError\n";
 
@@ -648,7 +599,6 @@ If the C<$input> parameter is a filehandle, the compressed data will be
 read from it.
 The string '-' can be used as an alias for standard input.
 
-
 =item A scalar reference 
 
 If C<$input> is a scalar reference, the compressed data will be read from
@@ -658,7 +608,6 @@ C<$$output>.
 
 =head2 Constructor Options
 
-
 The option names defined below are case insensitive and can be optionally
 prefixed by a '-'.  So all of the following are valid
 
@@ -682,8 +631,6 @@ This parameter defaults to 0.
 
 =item C<< MultiStream => 0|1 >>
 
-
-
 Allows multiple concatenated compressed streams to be treated as a single
 compressed stream. Decompression will stop once either the end of the
 file/buffer is reached, an error is encountered (premature eof, corrupt
@@ -692,7 +639,6 @@ start of another stream.
 
 This parameter defaults to 0.
 
-
 =item C<< Prime => $string >>
 
 This option will uncompress the contents of C<$string> before processing the
@@ -734,8 +680,6 @@ This option is mostly used when reading from a filehandle, in which case
 the file pointer will be left pointing to the first byte directly after the
 compressed data stream.
 
-
-
 This option defaults to off.
 
 =item C<< Append => 0|1 >>
@@ -752,22 +696,12 @@ Defaults to 0.
 
 =item C<< Strict => 0|1 >>
 
-
-
 This option controls whether the extra checks defined below are used when
 carrying out the decompression. When Strict is on, the extra tests are
 carried out, when Strict is off they are not.
 
 The default for this option is off.
 
-
-
-
-
-
-
-
-
 =over 5
 
 =item 1 
@@ -806,12 +740,6 @@ uncompressed data actually read from the file.
 
 =back
 
-
-
-
-
-
-
 =item C<< ParseExtra => 0|1 >>
 If the gzip FEXTRA header field is present and this option is set, it will
 force the module to check that it conforms to the sub-field structure as
@@ -821,9 +749,6 @@ If the C<Strict> is on it will automatically enable this option.
 
 Defaults to 0.
 
-
-
-
 =back
 
 =head2 Examples
@@ -867,7 +792,6 @@ or an IO error is encountered.
 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
 or a negative number on error.
 
-
 =head2 getline
 
 Usage is
@@ -882,7 +806,6 @@ C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
 determine what constitutes an end of line. Paragraph mode, record mode and
 file slurp mode are all supported. 
 
-
 =head2 getc
 
 Usage is 
@@ -897,8 +820,6 @@ Usage is
 
     $char = $z->ungetc($string)
 
-
-
 =head2 inflateSync
 
 Usage is
@@ -907,7 +828,6 @@ Usage is
 
 TODO
 
-
 =head2 getHeaderInfo
 
 Usage is
@@ -919,8 +839,6 @@ This method returns either a hash reference (in scalar context) or a list
 or hash references (in array context) that contains information about each
 of the header fields in the compressed data stream(s).
 
-
-
 =over 5
 
 =item Name
@@ -937,9 +855,6 @@ comment, which will return an empty string.
 
 =back
 
-
-
-
 =head2 tell
 
 Usage is
@@ -956,26 +871,17 @@ Usage is
     $z->eof();
     eof($z);
 
-
-
 Returns true if the end of the compressed input stream has been reached.
 
-
-
 =head2 seek
 
     $z->seek($position, $whence);
     seek($z, $position, $whence);
 
-
-
-
 Provides a sub-set of the C<seek> functionality, with the restriction
 that it is only legal to seek forward in the input file/buffer.
 It is a fatal error to attempt to seek backward.
 
-
-
 The C<$whence> parameter takes one the usual values, namely SEEK_SET,
 SEEK_CUR or SEEK_END.
 
@@ -1017,8 +923,6 @@ retrieve the autoflush setting.
     $z->input_line_number()
     $z->input_line_number(EXPR)
 
-
-
 Returns the current uncompressed line number. If C<EXPR> is present it has
 the effect of setting the line number. Note that setting the line number
 does not change the current position within the file/buffer being read.
@@ -1026,30 +930,25 @@ does not change the current position within the file/buffer being read.
 The contents of C<$/> are used to to determine what constitutes a line
 terminator.
 
-
-
 =head2 fileno
 
     $z->fileno()
     fileno($z)
 
-If the C<$z> object is associated with a file or a filehandle, this method
-will return the underlying file descriptor.
+If the C<$z> object is associated with a file or a filehandle, C<fileno>
+will return the underlying file descriptor. Once the C<close> method is
+called C<fileno> will return C<undef>.
 
-If the C<$z> object is is associated with a buffer, this method will
-return undef.
+If the C<$z> object is is associated with a buffer, this method will return
+C<undef>.
 
 =head2 close
 
     $z->close() ;
     close $z ;
 
-
-
 Closes the output file/buffer. 
 
-
-
 For most versions of Perl this method will be automatically invoked if
 the IO::Uncompress::Gunzip object is destroyed (either explicitly or by the
 variable with the reference to the object going out of scope). The
@@ -1068,9 +967,6 @@ If the C<AutoClose> option has been enabled when the IO::Uncompress::Gunzip
 object was created, and the object is associated with a file, the
 underlying file will also be closed.
 
-
-
-
 =head2 nextStream
 
 Usage is
@@ -1109,8 +1005,6 @@ of the input file.
 
 Don't bother using C<trailingData> if the input is a filename.
 
-
-
 If you know the length of the compressed data stream before you start
 uncompressing, you can avoid having to use C<trailingData> by setting the
 C<InputLength> option in the constructor.
@@ -1132,8 +1026,9 @@ Same as doing this
 
 =head1 EXAMPLES
 
+=head2 Working with Net::FTP
 
-
+See L<IO::Uncompress::Gunzip::FAQ|IO::Uncompress::Gunzip::FAQ/"Compressed files and Net::FTP">
 
 =head1 SEE ALSO
 
@@ -1145,7 +1040,6 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
 L<Archive::Tar|Archive::Tar>,
 L<IO::Zlib|IO::Zlib>
 
-
 For RFC 1950, 1951 and 1952 see 
 F<http://www.faqs.org/rfcs/rfc1950.html>,
 F<http://www.faqs.org/rfcs/rfc1951.html> and
@@ -1159,22 +1053,17 @@ F<http://www.zlib.org>.
 
 The primary site for gzip is F<http://www.gzip.org>.
 
-
-
-
 =head1 AUTHOR
 
 This module was written by Paul Marquess, F<pmqs@cpan.org>. 
 
-
-
 =head1 MODIFICATION HISTORY
 
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.