PHPackages                             matomo/decompress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. matomo/decompress

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

matomo/decompress
=================

3.0.0(1y ago)12889.5k↓11.2%114LGPL-3.0PHPPHP &gt;=7.2CI passing

Since Oct 2Pushed 1y ago9 watchersCompare

[ Source](https://github.com/matomo-org/component-decompress)[ Packagist](https://packagist.org/packages/matomo/decompress)[ RSS](/packages/matomo-decompress/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (11)Used By (4)

Matomo/Decompress
=================

[](#matomodecompress)

Component providing several adapters to decompress files.

[![PHPUnit](https://github.com/matomo-org/component-decompress/actions/workflows/phpunit.yml/badge.svg)](https://github.com/matomo-org/component-decompress/actions/workflows/phpunit.yml)

It supports the following compression formats:

- Zip
- Gzip
- Bzip
- Tar (gzip or bzip)

With the following adapters:

- `PclZip`, based on the [PclZip library](http://www.phpconcept.net/pclzip/)
- `ZipArchive`, based on PHP's [Zip extension](http://fr.php.net/manual/en/book.zip.php)
- `Gzip`, based on PHP's native Gzip functions
- `Bzip`, based on PHP's native Bzip functions
- `Tar`, based on the [Archive\_Tar library](https://github.com/pear/Archive_Tar) from PEAR

Installation
------------

[](#installation)

With Composer:

```
{
    "require": {
        "matomo/decompress": "^2.1"
    }
}
```

Usage
-----

[](#usage)

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

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

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

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

// Extracting Bzip file
$extractor = new \Matomo\Decompress\Bzip('file.bz');

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

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

// Extracting Zip file with ZipArchive
$extractor = new \Matomo\Decompress\ZipArchive('file.zip');

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

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

// Extracting Zip file with PclZip
$extractor = new \Matomo\Decompress\PclZip('file.zip');

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

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

// Extracting .tar.bz2 file
$extractor = new \Matomo\Decompress\Tar('file.tar.bz2', 'bz2');

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

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

// Extracting .tar.gz file
$extractor = new \Matomo\Decompress\Tar('file.tar.gz', 'gz');

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

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

License
-------

[](#license)

The Decompress component is released under the [LGPL v3.0](https://choosealicense.com/licenses/lgpl-3.0/).

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance41

Moderate activity, may be stable

Popularity48

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~411 days

Recently: every ~708 days

Total

10

Last Release

543d ago

Major Versions

0.1.1 → 1.0.02015-03-05

1.2.2 → 2.0.02018-02-09

2.1.0 → 3.0.02024-11-21

PHP version history (2 changes)0.1.0PHP &gt;=5.3.2

3.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/80e09d9121023df96ecb1fc20edac8c3d9b724b50dbd3815fa264ae1a6adc58b?d=identicon)[matomo](/maintainers/matomo)

---

Top Contributors

[![sgiehl](https://avatars.githubusercontent.com/u/1579355?v=4)](https://github.com/sgiehl "sgiehl (26 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (21 commits)")[![mattab](https://avatars.githubusercontent.com/u/466765?v=4)](https://github.com/mattab "mattab (14 commits)")[![tsteur](https://avatars.githubusercontent.com/u/273120?v=4)](https://github.com/tsteur "tsteur (9 commits)")[![williamdes](https://avatars.githubusercontent.com/u/7784660?v=4)](https://github.com/williamdes "williamdes (9 commits)")[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (8 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (5 commits)")[![halfdan](https://avatars.githubusercontent.com/u/176576?v=4)](https://github.com/halfdan "halfdan (4 commits)")[![nztim](https://avatars.githubusercontent.com/u/3453450?v=4)](https://github.com/nztim "nztim (2 commits)")[![craue](https://avatars.githubusercontent.com/u/800119?v=4)](https://github.com/craue "craue (2 commits)")[![cb8](https://avatars.githubusercontent.com/u/10119913?v=4)](https://github.com/cb8 "cb8 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matomo-decompress/health.svg)

```
[![Health](https://phpackages.com/badges/matomo-decompress/health.svg)](https://phpackages.com/packages/matomo-decompress)
```

###  Alternatives

[pear/pear

This is the definitive source of PEAR's core files.

1161.7M20](/packages/pear-pear)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)[whikloj/bagittools

A PHP library to manipulate and verify BagIt bags.

1220.5k2](/packages/whikloj-bagittools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
