Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    Archive::Zip 1.20

    Download button

    No screenshots available
    Downloads: 717  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Adam Kennedy | More programs
    Perl Artistic License / FREE
    July 4th, 2007, 05:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (1)  Refer to a friend  Subscribe

    Archive::Zip description

    Archive::Zip is a Perl module which provides an interface to ZIP archive files.

    Archive::Zip is a Perl module which provides an interface to ZIP archive files.

    SYNOPSIS

    # Create a Zip file
    use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
    my $zip = Archive::Zip->new();

    # Add a directory
    my $dir_member = $zip->addDirectory( 'dirname/' );

    # Add a file from a string with compression
    my $string_member = $zip->addString( 'This is a test', 'stringMember.txt' );
    $string_member->desiredCompressionMethod( COMPRESSION_DEFLATED );

    # Add a file from disk
    my $file_member = $zip->addFile( 'xyz.pl', 'AnotherName.pl' );

    # Save the Zip file
    unless ( $zip->writeToFileNamed('someZip.zip') == AZ_OK ) {
    die 'write error';
    }

    # Read a Zip file
    my $somezip = Archive::Zip->new();
    unless ( $somezip->read( 'someZip.zip' ) == AZ_OK ) {
    die 'read error';
    }

    # Change the compression type for a file in the Zip
    my $member = $somezip->memberNamed( 'stringMember.txt' );
    $member->desiredCompressionMethod( COMPRESSION_STORED );
    unless ( $zip->writeToFileNamed( 'someOtherZip.zip' ) == AZ_OK ) {
    die 'write error';
    }

    The Archive::Zip module allows a Perl program to create, manipulate, read, and write Zip archive files.

    Zip archives can be created, or you can read from existing zip files.
    Once created, they can be written to files, streams, or strings. Members can be added, removed, extracted, replaced, rearranged, and enumerated. They can also be renamed or have their dates, comments, or other attributes queried or modified. Their data can be compressed or uncompressed as needed.
    Members can be created from members in existing Zip files, or from existing directories, files, or strings.

    This module uses the Compress::Zlib library to read and write the compressed streams inside the files.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    ZIP archive | Perl interface | ZIP interface | Archive::Zip | zip | archive



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM