Update Compression modules to version 2.009
[p5sagit/p5-mst-13.2.git] / ext / IO_Compress_Zlib / lib / IO / Compress / Gzip.pm
index 8bf64fe..2733830 100644 (file)
@@ -8,12 +8,12 @@ use warnings;
 use bytes;
 
 
-use IO::Compress::RawDeflate 2.008 ;
+use IO::Compress::RawDeflate 2.009 ;
 
-use Compress::Raw::Zlib  2.008 ;
-use IO::Compress::Base::Common  2.008 qw(:Status :Parse createSelfTiedObject);
-use IO::Compress::Gzip::Constants 2.008 ;
-use IO::Compress::Zlib::Extra 2.008 ;
+use Compress::Raw::Zlib  2.009 ;
+use IO::Compress::Base::Common  2.009 qw(:Status :Parse createSelfTiedObject);
+use IO::Compress::Gzip::Constants 2.009 ;
+use IO::Compress::Zlib::Extra 2.009 ;
 
 BEGIN
 {
@@ -27,7 +27,7 @@ require Exporter ;
 
 our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError);
 
-$VERSION = '2.008';
+$VERSION = '2.009';
 $GzipError = '' ;
 
 @ISA    = qw(Exporter IO::Compress::RawDeflate);
@@ -274,8 +274,6 @@ __END__
 
 =head1 NAME
 
-
-
 IO::Compress::Gzip - Write RFC 1952 files/buffers
  
  
@@ -284,7 +282,6 @@ IO::Compress::Gzip - Write RFC 1952 files/buffers
 
     use IO::Compress::Gzip qw(gzip $GzipError) ;
 
-
     my $status = gzip $input => $output [,OPTS] 
         or die "gzip failed: $GzipError\n";
 
@@ -326,27 +323,15 @@ IO::Compress::Gzip - Write RFC 1952 files/buffers
 
 =head1 DESCRIPTION
 
-
 This module provides a Perl interface that allows writing compressed
 data to files or buffer as defined in RFC 1952.
 
-
-
-
-
 All the gzip headers defined in RFC 1952 can be created using
 this module.
 
-
-
-
-
-
-
 For reading RFC 1952 files/buffers, see the companion module 
 L<IO::Uncompress::Gunzip|IO::Uncompress::Gunzip>.
 
-
 =head1 Functional Interface
 
 A top-level function, C<gzip>, is provided to carry out
@@ -359,14 +344,10 @@ section.
     gzip $input => $output [,OPTS] 
         or die "gzip failed: $GzipError\n";
 
-
-
 The functional interface needs Perl5.005 or better.
 
-
 =head2 gzip $input => $output [, OPTS]
 
-
 C<gzip> expects at least two parameters, C<$input> and C<$output>.
 
 =head3 The C<$input> parameter
@@ -405,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 compressed.
 
-
-
 =item An Input FileGlob string
 
 If C<$input> is a string that is delimited by the characters "<" and ">"
@@ -417,12 +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.
 
-
 In addition, if C<$input> is a simple filename, the default values for
 the C<Name> and C<Time> options will be sourced from that file.
 
@@ -430,8 +407,6 @@ If you do not want to use these defaults they can be overridden by
 explicitly setting the C<Name> and C<Time> options or by setting the
 C<Minimal> parameter.
 
-
-
 =head3 The C<$output> parameter
 
 The parameter C<$output> is used to control the destination of the
@@ -451,14 +426,11 @@ If the C<$output> parameter is a filehandle, the compressed 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 compressed data will be
 stored in C<$$output>.
 
-
-
 =item An Array Reference
 
 If C<$output> is an array reference, the compressed data will be
@@ -477,21 +449,12 @@ 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 files/buffers and C<$output> is a single
 file/buffer the input files/buffers will be stored
 in C<$output> as a concatenated series of compressed data streams.
 
-
-
-
-
-
 =head2 Optional Parameters
 
 Unless specified below, the optional parameters for C<gzip>,
@@ -511,27 +474,18 @@ completed.
 
 This parameter defaults to 0.
 
-
 =item C<< BinModeIn => 0|1 >>
 
 When reading from a file or filehandle, set C<binmode> before reading.
 
 Defaults to 0.
 
-
-
-
-
 =item C<< Append => 0|1 >>
 
 TODO
 
-
-
 =back
 
-
-
 =head2 Examples
 
 To read the contents of the file C<file1.txt> and write the compressed
@@ -545,7 +499,6 @@ data to the file C<file1.txt.gz>.
     gzip $input => "$input.gz"
         or die "gzip failed: $GzipError\n";
 
-
 To read from an existing Perl filehandle, C<$input>, and write the
 compressed data to a buffer, C<$buffer>.
 
@@ -583,7 +536,6 @@ and if you want to compress each file one at a time, this will do the trick
             or die "Error compressing '$input': $GzipError\n";
     }
 
-
 =head1 OO Interface
 
 =head2 Constructor
@@ -623,7 +575,6 @@ If the C<$output> parameter is a filehandle, the compressed 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 compressed data will be stored
@@ -679,23 +630,15 @@ to it.  Otherwise the file pointer will not be moved.
 
 This parameter defaults to 0.
 
-
-
-
-
 =item C<< Merge => 0|1 >>
 
 This option is used to compress input data and append it to an existing
 compressed data stream in C<$output>. The end result is a single compressed
 data stream stored in C<$output>. 
 
-
-
 It is a fatal error to attempt to use this option when C<$output> is not an
 RFC 1952 data stream.
 
-
-
 There are a number of other limitations with the C<Merge> option:
 
 =over 5 
@@ -712,11 +655,8 @@ If C<$output> is a file or a filehandle, it must be seekable.
 
 =back
 
-
 This parameter defaults to 0.
 
-
-
 =item -Level 
 
 Defines the compression level used by zlib. The value should either be
@@ -749,11 +689,6 @@ constants defined below.
 
 The default is Z_DEFAULT_STRATEGY.
 
-
-
-
-
-
 =item C<< Minimal => 0|1 >>
 
 If specified, this option will force the creation of the smallest possible
@@ -881,12 +816,8 @@ If C<< Level => Z_BEST_SPEED >> has been specified then XFL is set to 2.
 If C<< Level => Z_BEST_COMPRESSION >> has been specified then XFL is set to 4.
 Otherwise XFL is set to 0.
 
-
-
 =item C<< Strict => 0|1 >>
 
-
-
 C<Strict> will optionally police the values supplied with other options
 to ensure they are compliant with RFC1952.
 
@@ -956,8 +887,6 @@ The ID header in an C<ExtraField> sub-field can consist of any two bytes.
 
 =back
 
-
-
 =back
 
 =head2 Examples
@@ -1019,14 +948,11 @@ unsuccessful.
 
 Usage is
 
-
     $z->flush;
     $z->flush($flush_type);
 
-
 Flushes any pending compressed data to the output file/buffer.
 
-
 This method takes an optional parameter, C<$flush_type>, that controls
 how the flushing will be carried out. By default the C<$flush_type>
 used is C<Z_FINISH>. Other valid values for C<$flush_type> are
@@ -1036,10 +962,8 @@ you fully understand the implications of what it does - overuse of C<flush>
 can seriously degrade the level of compression achieved. See the C<zlib>
 documentation for details.
 
-
 Returns true on success.
 
-
 =head2 tell
 
 Usage is
@@ -1056,28 +980,19 @@ Usage is
     $z->eof();
     eof($z);
 
-
-
 Returns true if the C<close> method has been called.
 
-
-
 =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 output file/buffer.
 It is a fatal error to attempt to seek backward.
 
 Empty parts of the file/buffer will have NULL (0x00) bytes written to them.
 
-
-
 The C<$whence> parameter takes one the usual values, namely SEEK_SET,
 SEEK_CUR or SEEK_END.
 
@@ -1119,33 +1034,27 @@ retrieve the autoflush setting.
     $z->input_line_number()
     $z->input_line_number(EXPR)
 
-
 This method always returns C<undef> when compressing. 
 
-
-
 =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 ;
 
-
-
 Flushes any pending compressed data and then closes the output file/buffer. 
 
-
-
 For most versions of Perl this method will be automatically invoked if
 the IO::Compress::Gzip object is destroyed (either explicitly or by the
 variable with the reference to the object going out of scope). The
@@ -1164,9 +1073,6 @@ If the C<AutoClose> option has been enabled when the IO::Compress::Gzip
 object was created, and the object is associated with a file, the
 underlying file will also be closed.
 
-
-
-
 =head2 newStream([OPTS])
 
 Usage is
@@ -1180,7 +1086,6 @@ the C<$z> object.
 
 See the L</"Constructor Options"> section for more details.
 
-
 =head2 deflateParams
 
 Usage is
@@ -1189,20 +1094,15 @@ Usage is
 
 TODO
 
-
 =head1 Importing 
 
-
 A number of symbolic constants are required by some methods in 
 C<IO::Compress::Gzip>. None are imported by default.
 
-
-
 =over 5
 
 =item :all
 
-
 Imports C<gzip>, C<$GzipError> and all symbolic
 constants that can be used by C<IO::Compress::Gzip>. Same as doing this
 
@@ -1212,10 +1112,8 @@ constants that can be used by C<IO::Compress::Gzip>. Same as doing this
 
 Import all symbolic constants. Same as doing this
 
-
     use IO::Compress::Gzip qw(:flush :level :strategy) ;
 
-
 =item :flush
 
 These symbolic constants are used by the C<flush> method.
@@ -1236,7 +1134,6 @@ These symbolic constants are used by the C<Level> option in the constructor.
     Z_BEST_COMPRESSION
     Z_DEFAULT_COMPRESSION
 
-
 =item :strategy
 
 These symbolic constants are used by the C<Strategy> option in the constructor.
@@ -1252,21 +1149,17 @@ These symbolic constants are used by the C<Strategy> option in the constructor.
 
 =back
 
-For 
-
 =head1 EXAMPLES
 
-TODO
-
-
-
-
-
-
+=head2 Apache::GZip Revisited
 
+See L<IO::Compress::Zlib::FAQ|IO::Compress::Zlib::FAQ/"Apache::GZip Revisited">
 
+    
 
+=head2 Working with Net::FTP
 
+See L<IO::Compress::Zlib::FAQ|IO::Compress::Zlib::FAQ/"Compressed files and Net::FTP">
 
 =head1 SEE ALSO
 
@@ -1278,7 +1171,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
@@ -1292,24 +1184,18 @@ 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.
 
-