~ubuntu-branches/ubuntu/trusty/horae/trusty

« back to all changes in this revision

Viewing changes to 0CPAN/Compress-Zlib-1.41/examples/filtdef

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/local/bin/perl
2
 
 
3
 
use strict ;
4
 
use warnings ;
5
 
 
6
 
use Compress::Zlib ;
7
 
 
8
 
binmode STDIN;
9
 
binmode STDOUT;
10
 
my $x = deflateInit()
11
 
   or die "Cannot create a deflation stream\n" ;
12
 
 
13
 
my ($output, $status) ;
14
 
while (<>)
15
 
{
16
 
    ($output, $status) = $x->deflate($_) ;
17
 
 
18
 
    $status == Z_OK
19
 
        or die "deflation failed\n" ;
20
 
 
21
 
    print $output ;
22
 
}
23
 
 
24
 
($output, $status) = $x->flush() ;
25
 
 
26
 
$status == Z_OK
27
 
    or die "deflation failed\n" ;
28
 
 
29
 
print $output ;