Zippy, the archive manager companion

Installs: 109 593

Dependents: 16

Stars: 146

Watchers: 16

Forks: 26

Open Issues: 11

0.3.4 2016-02-02 12:11 UTC


A Object-Oriented PHP library to manipulate any archive format (de)compression through commandline utilities or PHP extension.

Build Status


Zippy currently supports

  • zip
  • PHP zip
  • GNU tar
  • BSD tar

Which brings support to file types

  • .tar
  • .zip
  • .tar.gz
  • .tar.bz2

API Example

Archive listing and extraction :

use Alchemy\Zippy\Zippy;

$zippy = Zippy::load();
$zippy->create('', '/path/to/folder');

$archive = $zippy->open('build.tar');

// extract content to `/tmp`

// iterates through members
foreach ($archive as $member) {
    echo "archive contains $member \n";

Archive creation

use Alchemy\Zippy\Zippy;

$zippy = Zippy::load();
// creates an that contains a directory "folder" that contains
// files contained in "/path/to/directory" recursively
$archive = $zippy->create('', array(
    'folder' => '/path/to/directory'
), true);

Customize file and directory names inside archive

use Alchemy\Zippy\Zippy;

$zippy = Zippy::load();
$archive = $zippy->create('', array(
    'folder' => '/path/to/directory',            // will create a folder at root
    '',            // will create a logo.jpg file at root
    fopen(''), // will create an index.php at root
    'directory/image.jpg' => 'image.jpg',        // will create a image.jpg in 'directory' folder

API Browser


Documentation hosted at read the docs !


This project is licensed under the MIT license.

Bitdeli Badge