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
Compress::Raw::Zlib, Compress::Zlib, IO::Compress::Zlib 2.000_10
[p5sagit/p5-mst-13.2.git]
/
ext
/
Compress
/
Zlib
/
examples
/
gzstream
1
#!/usr/local/bin/perl
2
3
use strict ;
4
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
my $gz = gzopen('-', "wb")
12
or die "Cannot open stdout: $gzerrno\n" ;
13
14
while (<>) {
15
$gz->gzwrite($_)
16
or die "error writing: $gzerrno\n" ;
17
}
18
19
$gz->gzclose ;