Decompress files
PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libs
src
tests
.gitignore
.travis.yml
README.md
composer.json
phpunit.xml

README.md

Matomo/Decompress

Component providing several adapters to decompress files.

Build Status Scrutinizer Code Quality

It supports the following compression formats:

  • Zip
  • Gzip
  • Tar (gzip or bzip)

With the following adapters:

Installation

With Composer:

{
    "require": {
        "matomo/decompress": "*"
    }
}

Usage

All adapters have the same API as they implement Matomo\Decompress\DecompressInterface:

$extractor = new \Matomo\Decompress\Gzip('file.gz');

$extractedFiles = $extractor->extract('some/directory');

if ($extractedFiles === 0) {
    echo $extractor->errorInfo();
}

License

The Decompress component is released under the LGPL v3.0.