PHPackages                             lootils/archiver - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. lootils/archiver

ActiveLibrary[File &amp; Storage](/categories/file-storage)

lootils/archiver
================

An abstraction library to interface with file archives.

0.3.0(12y ago)42582[1 PRs](https://github.com/lootils/archiver/pulls)MITPHPPHP &gt;=5.3.0

Since Jul 3Pushed 10y agoCompare

[ Source](https://github.com/lootils/archiver)[ Packagist](https://packagist.org/packages/lootils/archiver)[ Docs](https://github.com/lootils/archiver)[ RSS](/packages/lootils-archiver/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Lootils Archiver
================

[](#lootils-archiver)

An abstraction library to interface with file archives.

[![Build Status](https://camo.githubusercontent.com/af6a97d905f245987cf92b22d7e3bbb60701e3fcb23be6899530be1e87e25430/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6c6f6f74696c732f61726368697665722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/lootils/archiver)

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

[](#installation)

Install Lootils Archiver by adding `lootils/archiver` to your *composer.json*file.

```
{
    "require": {
        "lootils/archiver": "*"
    }
}
```

Usage
-----

[](#usage)

Create a zip file:

```
$archive = \Lootils\Archiver\ZipArchive('myarchive.zip');
$archive->add('myfile.png');
```

Extract a .tar archive:

```
$archive = \Lootils\Archiver\TarArchive('myarchive.tar');
$archive->extract('destination');
```

List the contents of a .phar file:

```
$archive = \Lootils\Archiver\PharArchive('myarchive.phar');
$files = $archive->contents();
foreach ($files as $filename => $data) {
    echo $filename . ' ';
}
```

Dependencies
------------

[](#dependencies)

In order to interact with tar archives, make sure to add `pear/archive_tar` to your *composer.json* file.

Development
-----------

[](#development)

To install development tools, run the following:

```
curl -s http://getcomposer.org/installer | php
php composer.phar install
```

Run tests:

```
phpunit
```

License
-------

[](#license)

This library is available under a MIT license.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~115 days

Total

5

Last Release

4648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e009e68aaa3f72eb836b24c016afc08d8e7da904d10b65ba2982c9bcc6c02c19?d=identicon)[mattfarina](/maintainers/mattfarina)

![](https://avatars.githubusercontent.com/u/25086?v=4)[Rob Loach](/maintainers/RobLoach)[@RobLoach](https://github.com/RobLoach)

---

Top Contributors

[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (33 commits)")

### Embed Badge

![Health badge](/badges/lootils-archiver/health.svg)

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

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

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