#!/usr/local/bin/perl

use strict ;
local ($^W) = 1; #use warnings ;

use Compress::Zlib ;

binmode STDOUT;	# gzopen only sets it on the fd

my $gz = gzopen(\*STDOUT, "wb")
	  or die "Cannot open stdout: $gzerrno\n" ;

while (<>) {
    $gz->gzwrite($_) 
	or die "error writing: $gzerrno\n" ;
}

$gz->gzclose ;
