File Coverage

examples/compress-zlib/filtdef
Criterion Covered Total %
statement 20 20 100.0
branch 3 6 50.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 26 29 89.6


line stmt bran cond sub pod time code
1             #!/usr/local/bin/perl
2              
3 2     2   7376 use strict ;
  2         4  
  2         92  
4 2     2   7 use warnings ;
  2         2  
  2         69  
5              
6 2     2   1027 use Compress::Zlib ;
  2         28  
  2         2653  
7              
8 2         253494 binmode STDIN;
9 2         3 binmode STDOUT;
10 2 50       12 my $x = deflateInit()
11             or die "Cannot create a deflation stream\n" ;
12              
13 2         4 my ($output, $status) ;
14 2         185 while (<>)
15             {
16 30         44 ($output, $status) = $x->deflate($_) ;
17              
18 30 50       37 $status == Z_OK
19             or die "deflation failed\n" ;
20              
21 30         242 print $output ;
22             }
23              
24 2         11 ($output, $status) = $x->flush() ;
25              
26 2 50       6 $status == Z_OK
27             or die "deflation failed\n" ;
28              
29 2         0 print $output ;