Data-Transform-Zlib

 view release on metacpan or  search on metacpan

t/01_zlib.t  view on Meta::CPAN

foreach my $filter ( $original, $clone ) {

  isa_ok( $filter, "Data::Transform" );

  my $teststring = "All the little fishes";
  my $compressed = $filter->put( [ $teststring, Data::Transform::Meta::EOF->new() ] );
  is (@$compressed, 3, "sending a string plus EOF gets the right amount of packets");
  pop @$compressed; # the EOF packet doesn't go over the wire normally
  my $answer = $filter->get( $compressed );
  is( @$answer, 1, 'decoding those gets the correct number of packets');
  is( $answer->[0], $teststring, 'the decoded string equals the original' );

}

my $stack = Data::Transform::Stackable->new( Filters =>
	[ 
		Data::Transform::Zlib->new(),
		Data::Transform::Line->new(),
	],
);



( run in 0.245 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )