use IO::Handle ;
use Scalar::Util qw(dualvar);
-use IO::Compress::Base::Common 2.008 ;
-use Compress::Raw::Zlib 2.008 ;
-use IO::Compress::Gzip 2.008 ;
-use IO::Uncompress::Gunzip 2.008 ;
+use IO::Compress::Base::Common 2.009 ;
+use Compress::Raw::Zlib 2.009 ;
+use IO::Compress::Gzip 2.009 ;
+use IO::Uncompress::Gunzip 2.009 ;
use strict ;
use warnings ;
use bytes ;
our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
-$VERSION = '2.008';
+$VERSION = '2.009';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
package Compress::Zlib ;
-use IO::Compress::Gzip::Constants 2.008 ;
+use IO::Compress::Gzip::Constants 2.009 ;
sub memGzip($)
{
($d, $status) = deflateInit( [OPT] ) ;
$status = $d->deflate($input, $output) ;
- $status = $d->flush($output [, $flush_type]) ;
+ $status = $d->flush([$flush_type]) ;
$d->deflateParams(OPTS) ;
$d->deflateTune(OPTS) ;
$d->dict_adler() ;
ZLIB_VERSION
ZLIB_VERNUM
-
-
=head1 DESCRIPTION
The I<Compress::Zlib> module provides a Perl interface to the I<zlib>
Returns 0 on success.
-
=item B<$offset = $gz-E<gt>gztell() ;>
Returns the uncompressed file offset.
=back
-
=head2 Examples
Here is an example script which uses the interface. It implements a
C<Z_BEST_COMPRESSION>, and C<Z_DEFAULT_COMPRESSION>.
If C<$level> is not specified C<Z_DEFAULT_COMPRESSION> will be used.
-
=item B<$dest = uncompress($source) ;>
Uncompresses C<$source>. If successful it returns the uncompressed
this distribution for an alternative interface for reading/writing RFC 1950
files/buffers.
-
=head1 Deflate Interface
This section defines an interface that allows in-memory compression using
Here is a definition of the interface available:
-
=head2 B<($d, $status) = deflateInit( [OPT] )>
Initialises a deflation stream.
deflateInit( -Bufsize => 300,
-Level => Z_BEST_SPEED ) ;
-
=head2 B<($out, $status) = $d-E<gt>deflate($buffer)>
-
Deflates the contents of C<$buffer>. The buffer can either be a scalar
or a scalar reference. When finished, C<$buffer> will be
completely processed (assuming there were no errors). If the deflation
case that any output will be produced by this method. So don't rely on
the fact that C<$out> is empty for an error test.
-
-=head2 B<($out, $status) = $d-E<gt>flush([flush_type])>
+=head2 B<($out, $status) = $d-E<gt>flush()>
+=head2 B<($out, $status) = $d-E<gt>flush($flush_type)>
Typically used to finish the deflation. Any pending output will be
returned via C<$out>.
=head2 Example
-
Here is a trivial example of using C<deflate>. It simply reads standard
input, deflates it and writes it to standard output.
Here is a definition of the interface:
-
=head2 B<($i, $status) = inflateInit()>
Initialises an inflation stream.
data is available, C<inflateSync> can be called repeatedly with more
compressed data until the flush point is found.
-
=head2 B<$i-E<gt>dict_adler()>
Returns the adler32 value for the dictionary.
All the I<zlib> constants are automatically imported when you make use
of I<Compress::Zlib>.
-
=head1 SEE ALSO
L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
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
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) 1995-2007 Paul Marquess. All rights reserved.
+Copyright (c) 1995-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.
-
-