projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Drom Compress::Zlib 1.34 in ext/
[p5sagit/p5-mst-13.2.git]
/
ext
/
Compress
/
Zlib
/
examples
/
gzstream
1
#!/usr/local/bin/perl
2
3
use strict ;
4
local ($^W) = 1; #use warnings ;
5
6
use Compress::Zlib ;
7
8
binmode STDOUT; # gzopen only sets it on the fd
9
10
my $gz = gzopen(\*STDOUT, "wb")
11
or die "Cannot open stdout: $gzerrno\n" ;
12
13
while (<>) {
14
$gz->gzwrite($_)
15
or die "error writing: $gzerrno\n" ;
16
}
17
18
$gz->gzclose ;