PHPackages                             digitaldogsbody/mingulay - 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. digitaldogsbody/mingulay

ActiveLibrary

digitaldogsbody/mingulay
========================

A Zip file parser and range extractor

0.2.1(3y ago)161[9 issues](https://github.com/digitaldogsbody/mingulay/issues)[1 PRs](https://github.com/digitaldogsbody/mingulay/pulls)AGPL-3.0-or-laterPHPPHP &gt;=7.3

Since Sep 19Pushed 3y ago2 watchersCompare

[ Source](https://github.com/digitaldogsbody/mingulay)[ Packagist](https://packagist.org/packages/digitaldogsbody/mingulay)[ Docs](https://github.com/digitaldogsbody/mingulay)[ RSS](/packages/digitaldogsbody-mingulay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Mingulay
========

[](#mingulay)

[![The western cliffs with the stack of Arnamuil in the centre and Bagh na h-Aoineig to the left.](https://camo.githubusercontent.com/dfd827b8e735645f39bd245587371b21181c208f56bb90c04976e63130debefc/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f362f36382f5765737465726e5f636c696666735f6f665f4d696e67756c61792e6a7067 "Western cliffs of Mingulay")](https://camo.githubusercontent.com/dfd827b8e735645f39bd245587371b21181c208f56bb90c04976e63130debefc/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f362f36382f5765737465726e5f636c696666735f6f665f4d696e67756c61792e6a7067)

*Tony Kinghorn / Western Cliffs of Mingulay / CC BY-SA 2.0*

### Overview

[](#overview)

Mingulay is a PHP library for parsing file information out of [Zip files](https://en.wikipedia.org/wiki/ZIP_(file_format)). It searches for the End of Central Directory Record, parses out the data, and then uses this to retrieve the Central Directory Records which contain the metadata of the files in the Zip.

### What's in a name?

[](#whats-in-a-name)

[Mingulay](https://en.wikipedia.org/wiki/Mingulay) is an island in the [Hebrides](https://en.wikipedia.org/wiki/Hebrides), an archipelago off the west coast of my home country of Scotland, and so it seemed a fitting pick as this library was developed as a contribution towards the fantastic [Archipelago project](https://archipelago.nyc/) ([GitHub](https://github.com/esmero)).

### Installation

[](#installation)

Mingulay can be installed via Composer: `composer require digitaldogsbody/mingulay` or alternatively you can clone the repo or download a zip from the releases page and include the contents of `src/` in your project.

### Documentation

[](#documentation)

Some basic autogenerated PHPDoc documentation is available on GitHub pages: . This is automatically updated every time a commit is made to the main branch, and so should always be up-to-date with the latest code.

### Versioning

[](#versioning)

Mingulay follows [Semantic Versioning](https://semver.org/) practices. Until release 1.0.0, the interfaces and functionality should be considered unstable and likely to change.

### Usage

[](#usage)

Mingulay requires an object that implements the `Mingulay\SeekerInterface` interface. A `LocalFileSeeker` implementation is provided for working with Zip files on disk.

```
$seeker = new \Mingulay\Seeker\LocalFileSeeker("test/fixtures/single-file.zip");
$zip_info = new \Mingulay\ZipRangeReader($seeker);
var_dump($zip_info->files);
```

```
array(1) {
  'README.md'=>
  array(6) {
    ["file_name"]=>
    string(9) "README.md"
    ["offset"]=>
    int(0)
    ["compressed_size"]=>
    int(43)
    ["uncompressed_size"]=>
    int(43)
    ["CRC32"]=>
    string(8) "C6E036CC"
    ["comment"]=>
    string(0) ""
  }
}

```

Pointers to retrieve individual decompressed files can be acquired with the `getStream()` function:

```
$seeker = new \Mingulay\Seeker\LocalFileSeeker("test/fixtures/multiple-files.zip");
$zip_info = new \Mingulay\ZipRangeReader($seeker);
$fp = $zip_info->getStream("LICENSE");
$local_fp = fopen("/tmp/example", "wb");
while(!feof($fp)) {
    fwrite($local_fp, fread($fp, 2048));
}
fclose($local_fp);
fclose($fp);
```

### Acknowledgements and thanks

[](#acknowledgements-and-thanks)

- The [Webrecorder](https://github.com/webrecorder) team's [wabac.js](https://github.com/webrecorder/wabac.js). The initial inspiration for this library was an implementation of their [Zip Range Reader class](https://github.com/webrecorder/wabac.js/blob/main/src/wacz/ziprangereader.js) in PHP.
- [Jonatan Männchen](https://github.com/maennchen)'s [ZipStream-PHP library](https://github.com/maennchen/ZipStream-PHP).
- Diego, Allison, Albert, the rest of the METRO crew, and all the Archipelago Community for the discussions, ideas and support.

### License

[](#license)

[AGPL-3](https://www.gnu.org/licenses/agpl-3.0.txt)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

3

Last Release

1315d ago

### Community

Maintainers

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

---

Top Contributors

[![digitaldogsbody](https://avatars.githubusercontent.com/u/93522067?v=4)](https://github.com/digitaldogsbody "digitaldogsbody (44 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digitaldogsbody-mingulay/health.svg)

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

PHPackages © 2026

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