Paul Marquess > Compress-Raw-Zlib-2.044 > Compress::Raw::Zlib::FAQ

Download:
Compress-Raw-Zlib-2.044.tar.gz

Annotate this POD

CPAN RT

Open  0
Stalled  1
View/Report Bugs
Source  

NAME ^

Compress::Raw::Zlib::FAQ -- Frequently Asked Questions about Compress::Raw::Zlib

DESCRIPTION ^

Common questions answered.

Compatibility with Unix compress/uncompress.

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 ;

Accessing .tar.Z files

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 ;

Zlib Library Version Support

By default Compress::Raw::Zlib will build with a private copy of version 1.2.5 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

SEE ALSO ^

Compress::Zlib, IO::Compress::Gzip, IO::Uncompress::Gunzip, IO::Compress::Deflate, IO::Uncompress::Inflate, IO::Compress::RawDeflate, IO::Uncompress::RawInflate, IO::Compress::Bzip2, IO::Uncompress::Bunzip2, IO::Compress::Lzma, IO::Uncompress::UnLzma, IO::Compress::Xz, IO::Uncompress::UnXz, IO::Compress::Lzop, IO::Uncompress::UnLzop, IO::Compress::Lzf, IO::Uncompress::UnLzf, IO::Uncompress::AnyInflate, IO::Uncompress::AnyUncompress

IO::Compress::FAQ

File::GlobMapper, Archive::Zip, Archive::Tar, IO::Zlib

AUTHOR ^

This module was written by Paul Marquess, pmqs@cpan.org.

MODIFICATION HISTORY ^

See the Changes file.

COPYRIGHT AND LICENSE ^

Copyright (c) 2005-2011 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.

syntax highlighting: