Compress::Raw::Zlib::FAQ -- Frequently Asked Questions about Compress::Raw::Zlib |
Compress::Raw::Zlib::FAQ -- Frequently Asked Questions about Compress::Raw::Zlib
Common questions answered.
This module is not compatible with Unix compress
.
If you have the uncompress
program available, you can use this to read
compressed files
open F, "uncompress -c $filename |"; while (<F>) { ...
Alternatively, if you have the gunzip
program available, you can use
this to read compressed files
open F, "gunzip -c $filename |"; while (<F>) { ...
and this to write compress files, if you have the compress
program
available
open F, "| compress -c $filename "; print F "data"; ... close F ;
See previous FAQ item.
If the Archive::Tar
module is installed and either the uncompress
or
gunzip
programs are available, you can use one of these workarounds to
read .tar.Z
files.
Firstly with uncompress
use strict; use warnings; use Archive::Tar;
open F, "uncompress -c $filename |"; my $tar = Archive::Tar->new(*F); ...
and this with gunzip
use strict; use warnings; use Archive::Tar;
open F, "gunzip -c $filename |"; my $tar = Archive::Tar->new(*F); ...
Similarly, if the compress
program is available, you can use this to
write a .tar.Z
file
use strict; use warnings; use Archive::Tar; use IO::File;
my $fh = new IO::File "| compress -c >$filename"; my $tar = Archive::Tar->new(); ... $tar->write($fh); $fh->close ;
This module does not support reading/writing zip files.
Support for reading/writing zip files is included with the
IO::Compress::Zip
and IO::Uncompress::Unzip
modules.
The primary focus of the IO::Compress::Zip
and IO::Uncompress::Unzip
modules is to provide an IO::File
compatible streaming read/write
interface to zip files/buffers. They are not fully flegged archivers. If
you are looking for an archiver check out the Archive::Zip
module. You
can find it on CPAN at
http://www.cpan.org/modules/by-module/Archive/Archive-Zip-*.tar.gz
By default Compress::Raw::Zlib
will build with a private copy of version
1.2.3 of the zlib library. (See the README file for details of
how to override this behaviour)
If you decide to use a different version of the zlib library, you need to be aware of the following issues
First off, you must have zlib 1.0.5 or better.
You need to have zlib 1.2.1 or better if you want to use the -Merge
option with IO::Compress::Gzip
, IO::Compress::Deflate
and
IO::Compress::RawDeflate
.
the Compress::Zlib manpage, the IO::Compress::Gzip manpage, the IO::Uncompress::Gunzip manpage, the IO::Compress::Deflate manpage, the IO::Uncompress::Inflate manpage, the IO::Compress::RawDeflate manpage, the IO::Uncompress::RawInflate manpage, the IO::Compress::Bzip2 manpage, the IO::Uncompress::Bunzip2 manpage, the IO::Compress::Lzop manpage, the IO::Uncompress::UnLzop manpage, the IO::Compress::Lzf manpage, the IO::Uncompress::UnLzf manpage, the IO::Uncompress::AnyInflate manpage, the IO::Uncompress::AnyUncompress manpage
File::GlobMapper, Archive::Zip, Archive::Tar, IO::Zlib
This module was written by Paul Marquess, pmqs@cpan.org.
See the Changes file.
Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Compress::Raw::Zlib::FAQ -- Frequently Asked Questions about Compress::Raw::Zlib |