Archive-Libarchive

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME

    Archive::Libarchive - Modern Perl bindings to libarchive

VERSION

    version 0.09

SYNOPSIS

     use 5.020;
     use Archive::Libarchive qw( :const );
     
     my $r = Archive::Libarchive::ArchiveRead->new;
     $r->support_filter_all;
     $r->support_format_all;
     $r->open_filename("archive.tar", 10240) == ARCHIVE_OK
       or die $r->error_string;
     
     my $e = Archive::Libarchive::Entry->new;
     say $e->pathname while $r->next_header($e) == ARCHIVE_OK;

DESCRIPTION

    This module provides a Perl object-oriented interface to the libarchive
    library. The libarchive library is the API used to implemnt bsdtar, the
    default tar implementation on a number of operating systems, including
    FreeBSD, macOS and Windows. It can also be installed on most Linux
    distributions. But wait, there is more, libarchive supports a number of
    formats, compressors and filters transparently, so it can be a useful
    when used as a universal archiver/extractor. Supported formats include:

    various tar formats, including the oldest forms and the newest
    extensions

    zip

    ISO 9660 (CD-ROM image format)

    gzip

    bzip2

    uuencoded files

    shell archive (shar)

    ... and many many more

    There are a number of "simple" interfaces around this distribution,
    which are worth considering if you do not need the full power and
    configurability that this distribution provides.

    Archive::Libarchive::Peek

      Provides an interface for listing and retrieving entries from an
      archive without extracting them to the local filesystem.

    Archive::Libarchive::Extract

      Provides an interface for extracting arbitrary archives of any
      format/filter supported by libarchive.

    Archive::Libarchive::Unwrap

      Decompresses / unwraps files that have been compressed or wrapped in
      any of the filter formats supported by libarchive

    This distribution is split up into several classes, that correspond to
    libarchive classes. Probably the best place to start when learning how
    to use this module is to look at the "EXAMPLES" section below, but you
    can also take a look at the main class documentation for the operation
    that you are interested in as well:

    Archive => Archive::Libarchive::ArchiveRead

      Class for reading from archives.

    Archive => Archive::Libarchive::ArchiveWrite

      Class for creating new archives.

    Archive => ArchiveRead => Archive::Libarchive::DiskRead

      Class for reading file entries from a local filesystem.

    Archive => ArchiveWrite => Archive::Libarchive::DiskWrite

      Class for writing file entries to a local filesystem.



( run in 2.715 seconds using v1.01-cache-2.11-cpan-98e64b0badf )