matomo/decompress

2.0.0 2018-02-09 12:19 UTC

README

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.