Add ARM files
[dh-make-perl] / dev / arm / libio-compress-zlib-perl / libio-compress-zlib-perl-2.012 / debian / libio-compress-zlib-perl / usr / share / perl5 / IO / Compress / Adapter / Identity.pm
diff --git a/dev/arm/libio-compress-zlib-perl/libio-compress-zlib-perl-2.012/debian/libio-compress-zlib-perl/usr/share/perl5/IO/Compress/Adapter/Identity.pm b/dev/arm/libio-compress-zlib-perl/libio-compress-zlib-perl-2.012/debian/libio-compress-zlib-perl/usr/share/perl5/IO/Compress/Adapter/Identity.pm
new file mode 100644 (file)
index 0000000..c615797
--- /dev/null
@@ -0,0 +1,101 @@
+package IO::Compress::Adapter::Identity ;
+
+use strict;
+use warnings;
+use bytes;
+
+use IO::Compress::Base::Common  2.012 qw(:Status);
+our ($VERSION);
+
+$VERSION = '2.012';
+
+sub mkCompObject
+{
+    my $level    = shift ;
+    my $strategy = shift ;
+
+    return bless {
+                  'CompSize'   => 0,
+                  'UnCompSize' => 0,
+                  'Error'      => '',
+                  'ErrorNo'    => 0,
+                 } ;     
+}
+
+sub compr
+{
+    my $self = shift ;
+
+    if (defined ${ $_[0] } && length ${ $_[0] }) {
+        $self->{CompSize} += length ${ $_[0] } ;
+        $self->{UnCompSize} = $self->{CompSize} ;
+
+        if ( ref $_[1] ) 
+          { ${ $_[1] } .= ${ $_[0] } }
+        else
+          { $_[1] .= ${ $_[0] } }
+    }
+
+    return STATUS_OK ;
+}
+
+sub flush
+{
+    my $self = shift ;
+
+    return STATUS_OK;    
+}
+
+sub close
+{
+    my $self = shift ;
+
+    return STATUS_OK;    
+}
+
+sub reset
+{
+    my $self = shift ;
+
+    $self->{CompSize}   = 0;
+    $self->{UnCompSize} = 0;
+
+    return STATUS_OK;    
+}
+
+sub deflateParams 
+{
+    my $self = shift ;
+
+    return STATUS_OK;   
+}
+
+#sub total_out
+#{
+#    my $self = shift ;
+#    return $self->{UnCompSize} ;
+#}
+#
+#sub total_in
+#{
+#    my $self = shift ;
+#    return $self->{UnCompSize} ;
+#}
+
+sub compressedBytes
+{
+    my $self = shift ;
+    return $self->{UnCompSize} ;
+}
+
+sub uncompressedBytes
+{
+    my $self = shift ;
+    return $self->{UnCompSize} ;
+}
+
+1;
+
+
+__END__
+