use strict;
use warnings;
+use bytes;
-use Compress::Zlib::Common qw(createSelfTiedObject);
+use IO::Compress::Base::Common qw(createSelfTiedObject);
-use UncompressPlugin::Inflate ();
-#use UncompressPlugin::Bunzip2 ();
+use IO::Uncompress::Adapter::Inflate ();
-#use IO::Uncompress::Base ;
+use IO::Uncompress::Base ;
use IO::Uncompress::Gunzip ;
use IO::Uncompress::Inflate ;
use IO::Uncompress::RawInflate ;
use IO::Uncompress::Unzip ;
-#use IO::Uncompress::Bunzip2 ;
-#use IO::Uncompress::UnLzop ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError);
-$VERSION = '2.000_07';
+$VERSION = '2.000_08';
$AnyInflateError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
my $class = shift ;
my $got = shift ;
- my ($obj, $errstr, $errno) = UncompressPlugin::Inflate::mkUncompObject();
+ my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
=head1 NAME
+
IO::Uncompress::AnyInflate - Perl interface to read RFC 1950, 1951 & 1952 files/buffers
+
=head1 SYNOPSIS
use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError) ;
$line = $z->getline()
$char = $z->getc()
$char = $z->ungetc()
+ $char = $z->opened()
+
$status = $z->inflateSync()
+
$z->trailingData()
$data = $z->getHeaderInfo()
$z->tell()
The default for this option is off.
-If the input is an RFC1950 data stream, the following will be checked:
+If the input is an RFC 1950 data stream, the following will be checked:
-If the input is a gzip (RFC1952) data stream, the following will be checked:
+If the input is a gzip (RFC 1952) data stream, the following will be checked:
=item 4
If the gzip FEXTRA header field is present it must conform to the sub-field
-structure as defined in RFC1952.
+structure as defined in RFC 1952.
=item 5
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
-defined in RFC1952.
+defined in RFC 1952.
If the C<Strict> is on it will automatically enable this option.
+
+
=back
=head2 Examples
$char = $z->ungetc($string)
+
=head2 inflateSync
Usage is
TODO
+
=head2 getHeaderInfo
Usage is
This is a noop provided for completeness.
+=head2 opened
+
+ $z->opened()
+
+Returns true if the object currently refers to a opened file/buffer.
+
+=head2 autoflush
+
+ my $prev = $z->autoflush()
+ my $prev = $z->autoflush(EXPR)
+
+If the C<$z> object is associated with a file or a filehandle, this method
+returns the current autoflush setting for the underlying filehandle. If
+C<EXPR> is present, and is non-zero, it will enable flushing after every
+write/print operation.
+
+If C<$z> is associated with a buffer, this method has no effect and always
+returns C<undef>.
+
+B<Note> that the special variable C<$|> B<cannot> be used to set or
+retrieve the autoflush setting.
+
+=head2 input_line_number
+
+ $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.
+
+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, this method will return
-the underlying filehandle.
+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 is associated with a buffer, this method will
return undef.
=head1 SEE ALSO
-L<Compress::Zlib>, 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<Compress::Zlib>, 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::Uncompress::AnyUncompress>
L<Compress::Zlib::FAQ|Compress::Zlib::FAQ>
-L<File::GlobMapper|File::GlobMapper>, L<Archive::Tar|Archive::Zip>,
+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
F<http://www.faqs.org/rfcs/rfc1952.html>
-The primary site for the gzip program is F<http://www.gzip.org>.
+The I<zlib> compression library was written by Jean-loup Gailly
+F<gzip@prep.ai.mit.edu> and Mark Adler F<madler@alumni.caltech.edu>.
+
+The primary site for the I<zlib> compression library is
+F<http://www.zlib.org>.
+
+The primary site for gzip is F<http://www.gzip.org>.
+
+
+
+
+
+
=head1 AUTHOR
The I<IO::Uncompress::AnyInflate> module was written by Paul Marquess,
-F<pmqs@cpan.org>. The latest copy of the module can be
-found on CPAN in F<modules/by-module/Compress/Compress-Zlib-x.x.tar.gz>.
+F<pmqs@cpan.org>.
-The I<zlib> compression library was written by Jean-loup Gailly
-F<gzip@prep.ai.mit.edu> and Mark Adler F<madler@alumni.caltech.edu>.
-The primary site for the I<zlib> compression library is
-F<http://www.zlib.org>.
=head1 MODIFICATION HISTORY
Copyright (c) 2005-2006 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.
-
-