Update Compression modules to version 2.009
[p5sagit/p5-mst-13.2.git] / ext / IO_Compress_Zlib / lib / IO / Compress / RawDeflate.pm
index b2f5d26..c0c4170 100644 (file)
@@ -7,16 +7,16 @@ use warnings;
 use bytes;
 
 
-use IO::Compress::Base 2.008 ;
-use IO::Compress::Base::Common  2.008 qw(:Status createSelfTiedObject);
-use IO::Compress::Adapter::Deflate  2.008 ;
+use IO::Compress::Base 2.009 ;
+use IO::Compress::Base::Common  2.009 qw(:Status createSelfTiedObject);
+use IO::Compress::Adapter::Deflate  2.009 ;
 
 require Exporter ;
 
 
 our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError);
 
-$VERSION = '2.008';
+$VERSION = '2.009';
 $RawDeflateError = '';
 
 @ISA = qw(Exporter IO::Compress::Base);
@@ -143,8 +143,8 @@ sub getZlibParams
 {
     my $self = shift ;
 
-    use IO::Compress::Base::Common  2.008 qw(:Parse);
-    use Compress::Raw::Zlib  2.008 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
+    use IO::Compress::Base::Common  2.009 qw(:Parse);
+    use Compress::Raw::Zlib  2.009 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY);
 
     
     return (
@@ -251,8 +251,6 @@ __END__
 
 =head1 NAME
 
-
-
 IO::Compress::RawDeflate - Write RFC 1951 files/buffers
  
  
@@ -261,7 +259,6 @@ IO::Compress::RawDeflate - Write RFC 1951 files/buffers
 
     use IO::Compress::RawDeflate qw(rawdeflate $RawDeflateError) ;
 
-
     my $status = rawdeflate $input => $output [,OPTS] 
         or die "rawdeflate failed: $RawDeflateError\n";
 
@@ -303,27 +300,15 @@ IO::Compress::RawDeflate - Write RFC 1951 files/buffers
 
 =head1 DESCRIPTION
 
-
 This module provides a Perl interface that allows writing compressed
 data to files or buffer as defined in RFC 1951.
 
-
-
-
-
-
-
 Note that RFC 1951 data is not a good choice of compression format
 to use in isolation, especially if you want to auto-detect it.
 
-
-
-
-
 For reading RFC 1951 files/buffers, see the companion module 
 L<IO::Uncompress::RawInflate|IO::Uncompress::RawInflate>.
 
-
 =head1 Functional Interface
 
 A top-level function, C<rawdeflate>, is provided to carry out
@@ -336,14 +321,10 @@ section.
     rawdeflate $input => $output [,OPTS] 
         or die "rawdeflate failed: $RawDeflateError\n";
 
-
-
 The functional interface needs Perl5.005 or better.
 
-
 =head2 rawdeflate $input => $output [, OPTS]
 
-
 C<rawdeflate> expects at least two parameters, C<$input> and C<$output>.
 
 =head3 The C<$input> parameter
@@ -382,8 +363,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 ">"
@@ -394,13 +373,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
@@ -420,14 +396,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
@@ -446,21 +419,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<rawdeflate>,
@@ -480,27 +444,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
@@ -514,7 +469,6 @@ data to the file C<file1.txt.1951>.
     rawdeflate $input => "$input.1951"
         or die "rawdeflate failed: $RawDeflateError\n";
 
-
 To read from an existing Perl filehandle, C<$input>, and write the
 compressed data to a buffer, C<$buffer>.
 
@@ -552,7 +506,6 @@ and if you want to compress each file one at a time, this will do the trick
             or die "Error compressing '$input': $RawDeflateError\n";
     }
 
-
 =head1 OO Interface
 
 =head2 Constructor
@@ -592,7 +545,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
@@ -648,23 +600,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 1951 data stream.
 
-
-
 There are a number of other limitations with the C<Merge> option:
 
 =over 5 
@@ -681,11 +625,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
@@ -718,19 +659,10 @@ constants defined below.
 
 The default is Z_DEFAULT_STRATEGY.
 
-
-
-
-
-
 =item C<< Strict => 0|1 >>
 
-
-
 This is a placeholder option.
 
-
-
 =back
 
 =head2 Examples
@@ -792,14 +724,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
@@ -809,10 +738,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
@@ -829,28 +756,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.
 
@@ -892,33 +810,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::RawDeflate object is destroyed (either explicitly or by the
 variable with the reference to the object going out of scope). The
@@ -937,9 +849,6 @@ If the C<AutoClose> option has been enabled when the IO::Compress::RawDeflate
 object was created, and the object is associated with a file, the
 underlying file will also be closed.
 
-
-
-
 =head2 newStream([OPTS])
 
 Usage is
@@ -953,7 +862,6 @@ the C<$z> object.
 
 See the L</"Constructor Options"> section for more details.
 
-
 =head2 deflateParams
 
 Usage is
@@ -962,20 +870,15 @@ Usage is
 
 TODO
 
-
 =head1 Importing 
 
-
 A number of symbolic constants are required by some methods in 
 C<IO::Compress::RawDeflate>. None are imported by default.
 
-
-
 =over 5
 
 =item :all
 
-
 Imports C<rawdeflate>, C<$RawDeflateError> and all symbolic
 constants that can be used by C<IO::Compress::RawDeflate>. Same as doing this
 
@@ -985,10 +888,8 @@ constants that can be used by C<IO::Compress::RawDeflate>. Same as doing this
 
 Import all symbolic constants. Same as doing this
 
-
     use IO::Compress::RawDeflate qw(:flush :level :strategy) ;
 
-
 =item :flush
 
 These symbolic constants are used by the C<flush> method.
@@ -1009,7 +910,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.
@@ -1025,21 +925,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
 
@@ -1051,7 +947,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
@@ -1065,24 +960,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.
 
-