Change 27380 (HEK into the IV union failed to convert the code in the
[p5sagit/p5-mst-13.2.git] / ext / Compress / Zlib / examples / gzstream
CommitLineData
f4c6fd49 1#!/usr/local/bin/perl
2
3use strict ;
8aa25532 4use warnings ;
642e522c 5use IO::Compress::Gzip qw(gzip $GzipError);
f4c6fd49 6
642e522c 7gzip '-' => '-', Minimal => 1
8 or die "gzstream: $GzipError\n" ;
f4c6fd49 9
642e522c 10#exit 0;
f4c6fd49 11
642e522c 12__END__
13
14#my $gz = new IO::Compress::Gzip *STDOUT
15my $gz = new IO::Compress::Gzip '-'
16 or die "gzstream: Cannot open stdout as gzip stream: $GzipError\n" ;
f4c6fd49 17
18while (<>) {
642e522c 19 $gz->write($_)
20 or die "gzstream: Error writing gzip output stream: $GzipError\n" ;
f4c6fd49 21}
22
642e522c 23$gz->close
24 or die "gzstream: Error closing gzip output stream: $GzipError\n" ;