1b39c5158Smillertpackage IO::Compress::Adapter::Identity ; 2b39c5158Smillert 3b39c5158Smillertuse strict; 4b39c5158Smillertuse warnings; 5b39c5158Smillertuse bytes; 6b39c5158Smillert 7*3d61058aSafresh1use IO::Compress::Base::Common 2.212 qw(:Status); 8b39c5158Smillertour ($VERSION); 9b39c5158Smillert 10*3d61058aSafresh1$VERSION = '2.212'; 11b39c5158Smillert 12b39c5158Smillertsub mkCompObject 13b39c5158Smillert{ 14b39c5158Smillert my $level = shift ; 15b39c5158Smillert my $strategy = shift ; 16b39c5158Smillert 17b39c5158Smillert return bless { 18b39c5158Smillert 'CompSize' => 0, 19b39c5158Smillert 'UnCompSize' => 0, 20b39c5158Smillert 'Error' => '', 21b39c5158Smillert 'ErrorNo' => 0, 22b39c5158Smillert } ; 23b39c5158Smillert} 24b39c5158Smillert 25b39c5158Smillertsub compr 26b39c5158Smillert{ 27b39c5158Smillert my $self = shift ; 28b39c5158Smillert 29b39c5158Smillert if (defined ${ $_[0] } && length ${ $_[0] }) { 30b39c5158Smillert $self->{CompSize} += length ${ $_[0] } ; 31b39c5158Smillert $self->{UnCompSize} = $self->{CompSize} ; 32b39c5158Smillert 33b39c5158Smillert if ( ref $_[1] ) 34b39c5158Smillert { ${ $_[1] } .= ${ $_[0] } } 35b39c5158Smillert else 36b39c5158Smillert { $_[1] .= ${ $_[0] } } 37b39c5158Smillert } 38b39c5158Smillert 39b39c5158Smillert return STATUS_OK ; 40b39c5158Smillert} 41b39c5158Smillert 42b39c5158Smillertsub flush 43b39c5158Smillert{ 44b39c5158Smillert my $self = shift ; 45b39c5158Smillert 46b39c5158Smillert return STATUS_OK; 47b39c5158Smillert} 48b39c5158Smillert 49b39c5158Smillertsub close 50b39c5158Smillert{ 51b39c5158Smillert my $self = shift ; 52b39c5158Smillert 53b39c5158Smillert return STATUS_OK; 54b39c5158Smillert} 55b39c5158Smillert 56b39c5158Smillertsub reset 57b39c5158Smillert{ 58b39c5158Smillert my $self = shift ; 59b39c5158Smillert 60b39c5158Smillert $self->{CompSize} = 0; 61b39c5158Smillert $self->{UnCompSize} = 0; 62b39c5158Smillert 63b39c5158Smillert return STATUS_OK; 64b39c5158Smillert} 65b39c5158Smillert 66b39c5158Smillertsub deflateParams 67b39c5158Smillert{ 68b39c5158Smillert my $self = shift ; 69b39c5158Smillert 70b39c5158Smillert return STATUS_OK; 71b39c5158Smillert} 72b39c5158Smillert 73b39c5158Smillert#sub total_out 74b39c5158Smillert#{ 75b39c5158Smillert# my $self = shift ; 76b39c5158Smillert# return $self->{UnCompSize} ; 77b39c5158Smillert#} 78b39c5158Smillert# 79b39c5158Smillert#sub total_in 80b39c5158Smillert#{ 81b39c5158Smillert# my $self = shift ; 82b39c5158Smillert# return $self->{UnCompSize} ; 83b39c5158Smillert#} 84b39c5158Smillert 85b39c5158Smillertsub compressedBytes 86b39c5158Smillert{ 87b39c5158Smillert my $self = shift ; 88b39c5158Smillert return $self->{UnCompSize} ; 89b39c5158Smillert} 90b39c5158Smillert 91b39c5158Smillertsub uncompressedBytes 92b39c5158Smillert{ 93b39c5158Smillert my $self = shift ; 94b39c5158Smillert return $self->{UnCompSize} ; 95b39c5158Smillert} 96b39c5158Smillert 97b39c5158Smillert1; 98b39c5158Smillert 99b39c5158Smillert 100b39c5158Smillert__END__ 101