=head1 NAME Compress::Zlib::FAQ -- Frequently Asked Questions about Compress::Zlib =head1 DESCRIPTION Common questions answered. =head2 Compatibility with Unix compress/uncompress. Although C has a pair of functions called C and C, they are I related to the Unix programs of the same name. The C module is not compatible with Unix C. If you have the C program available, you can use this to read compressed files open F, "uncompress -c $filename |"; while () { ... Alternatively, if you have the C program available, you can use this to read compressed files open F, "gunzip -c $filename |"; while () { ... and this to write compress files, if you have the C program available open F, "| compress -c $filename "; print F "data"; ... close F ; =head2 Accessing .tar.Z files The C module can optionally use C (via the C module) to access tar files that have been compressed with C. Unfortunately tar files compressed with the Unix C utility cannot be read by C and so cannot be directly accessed by C. If the C or C programs are available, you can use one of these workarounds to read C<.tar.Z> files from C Firstly with C use strict; use warnings; use Archive::Tar; open F, "uncompress -c $filename |"; my $tar = Archive::Tar->new(*F); ... and this with C use strict; use warnings; use Archive::Tar; open F, "gunzip -c $filename |"; my $tar = Archive::Tar->new(*F); ... Similarly, if the C program is available, you can use this to write a C<.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 ; =head2 Accessing Zip Files This module does not support reading/writing zip files. Support for reading/writing zip files is included with the C and C modules. The primary focus of the C and C modules is to provide an C 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 C module. You can find it on CPAN at http://www.cpan.org/modules/by-module/Archive/Archive-Zip-*.tar.gz =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L L L, L, L, L =head1 AUTHOR This module was written by Paul Marquess, F. =head1 MODIFICATION HISTORY See the Changes file. =head1 COPYRIGHT AND LICENSE Copyright (c) 2005-2008 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.