IO::Compress::*
[p5sagit/p5-mst-13.2.git] / ext / Compress / IO / Base / lib / IO / Compress / Base.pm
index 19669e2..14363bc 100644 (file)
@@ -20,7 +20,7 @@ use bytes;
 our (@ISA, $VERSION, $got_encode);
 #@ISA    = qw(Exporter IO::File);
 
-$VERSION = '2.000_08';
+$VERSION = '2.000_11';
 
 #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16.
 
@@ -548,6 +548,10 @@ sub DESTROY
 
 
 
+sub filterUncompressed
+{
+}
+
 sub syswrite
 {
     my $self = shift ;
@@ -596,6 +600,8 @@ sub syswrite
         *$self->{UnCompSize_32bit} += $buffer_length ;
     }
 
+    $self->filterUncompressed($buffer);
+
 #    if (*$self->{Encoding}) {
 #        $$buffer = *$self->{Encoding}->encode($$buffer);
 #    }
@@ -695,7 +701,8 @@ sub newStream
         ${ *$self->{Buffer} } = '' ;
     }
     
-    my $status = *$self->{Compress}->reset() ;
+    #my $status = *$self->{Compress}->reset() ;
+    my $status = $self->reset() ;
     return $self->saveErrorString(0, *$self->{Compress}{Error}, 
                                   *$self->{Compress}{ErrorNo})
         if $status == STATUS_ERROR;
@@ -706,6 +713,12 @@ sub newStream
     return 1 ;
 }
 
+sub reset
+{
+    my $self = shift ;
+    return *$self->{Compress}->reset() ;
+}
+
 sub _writeTrailer
 {
     my $self = shift ;
@@ -968,13 +981,9 @@ L<IO::Zlib|IO::Zlib>
 
 
 
-
-
-
 =head1 AUTHOR
 
-The I<IO::Compress::Base> module was written by Paul Marquess,
-F<pmqs@cpan.org>. 
+This module was written by Paul Marquess, F<pmqs@cpan.org>. 
 
 
 
@@ -983,7 +992,6 @@ F<pmqs@cpan.org>.
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
 Copyright (c) 2005-2006 Paul Marquess. All rights reserved.