Commit | Line | Data |
f4c6fd49 |
1 | Compress::Zlib - 1.00 |
2 | |
3 | Announcing release 1.00 of Compress::Zlib (formerly known as Zip |
4 | in the module list). |
5 | |
6 | What is Compress::Zlib? |
7 | ======================= |
8 | |
9 | Compress::Zlib is a Perl external module which provides an interface to |
10 | the info-zip zlib compression library. zlib is a general purpose |
11 | compression library. |
12 | |
13 | Some of the features provided by Compress::Zlib include: |
14 | |
15 | * in-memory compression and decompression |
16 | * read and write gzip (.gz) files directly. |
17 | |
18 | By way of an example here is a small script which reads gzipped files |
19 | and writes the unzipped output to standard output. |
20 | |
21 | |
22 | use Compress::Zlib ; |
23 | |
24 | die "Usage: gzcat file...\n" |
25 | unless @ARGV ; |
26 | |
27 | foreach $file (@ARGV) { |
28 | $gz = gzopen($file, "rb") |
29 | or die "Cannot open $file: $gzerrno\n" ; |
30 | |
31 | print $buffer while $gz->gzread($buffer) > 0 ; |
32 | |
33 | die "Error reading from $file: $gzerrno\n" if $gzerrno ; |
34 | |
35 | $gz->gzclose() ; |
36 | } |
37 | |
38 | |
39 | Availability |
40 | ============ |
41 | |
42 | The latest copy of Compress::ZLib is available on CPAN |
43 | |
44 | http://www.cpan.org/modules/by-module/Archive/Archive-Zip-*.tar.gz |
45 | |
46 | and zlib is available at |
47 | |
48 | http://www.gzip.org/zlib/ |
49 | |
50 | |
51 | Paul Marquess |