PHPackages                             dimsav/unix-zipper - 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. dimsav/unix-zipper

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

dimsav/unix-zipper
==================

A simple compression package for Unix operating systems. UnixZipper is ideal for creating backups of your projects in unix servers.

v1.2(12y ago)224.6k↑700%2MITPHPPHP &gt;=5.3.0

Since Sep 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/dimsav/unix-zipper)[ Packagist](https://packagist.org/packages/dimsav/unix-zipper)[ Docs](http://github.com/dimsav/unix-zipper)[ RSS](/packages/dimsav-unix-zipper/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)DependenciesVersions (7)Used By (2)

UnixZipper
==========

[](#unixzipper)

[![Latest Stable Version](https://camo.githubusercontent.com/b81d9cc5e7d1dfb16ee2fcdf5f212a887cbabd41760245e48226230fe6f93353/68747470733a2f2f706f7365722e707567782e6f72672f64696d7361762f756e69782d7a69707065722f762f737461626c652e706e67)](https://packagist.org/packages/dimsav/unix-zipper) [![Build Status](https://camo.githubusercontent.com/7ae6843169f21b207904a64321275927275fe5f154da40c3d134bed49b3ebb7a/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2f6672616d65776f726b2e706e67)](https://travis-ci.org/dimsav/unix-zipper)

A simple zip compression library for Unix operating systems. UnixZipper is ideal for creating backups of your projects in unix servers.

Features
--------

[](#features)

1. Easy to use
2. Password protection
3. Tested for stability

How does it work
----------------

[](#how-does-it-work)

Here is a simple example. Feel free to check the tests to see the class in action.

```
// Instantiate the class
$zipper = new UnixZipper();

// Add absolute paths of directories or files for compression
$zipper->add('/absolute/path/to/some/directory');
$zipper->add('/absolute/path/to/file.txt');

// Exclude directories and files
$zipper->exclude('/absolute/path/to/some/directory');
$zipper->exclude('/absolute/path/to/some/file.txt');

// Add a password if you wish
$zipper->setPassword('my_password');

// The path of the file that will be generated
// If the given path doesn't exist, it will be created automatically.
$zipper->setDestination('/file/after/compression/test.zip');

// Do the magic
$zipper->compress();
```

Since version 1.2, you can set a base path, and provide the files to be compressed relatively.

```
$zipper = new UnixZipper();

// Set base path
$zipper->setAbsolutePathAsBase('/absolute/projects');

// Add relative paths of directories or files for compression
$zipper->add('project-1');     // /absolute/projects/project-1
$zipper->add('logs/file.txt'); // /absolute/projects/logs/file.txt

$zipper->setDestination('/file/after/compression/test.zip');

// Compress
$zipper->compress();
```

Why unix
--------

[](#why-unix)

The reason I chose to make this package unix-only is because I wanted to rely on the system's zip function, that offers stability and flexibility. It also offers the possibility to exclude directories recursively, a feature I couldn't find in other php classes.

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

[](#installation)

Install using composer:

1. Add `"dimsav/unix-zipper": "1.*"` to your composer.json file
2. Run `composer update`

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

[](#dependencies)

The only requirements are:

- executing the code on a unix system
- composer for installing/autoloading

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

4542d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1785686?v=4)[Dimitris Savvopoulos](/maintainers/dimsav)[@dimsav](https://github.com/dimsav)

---

Top Contributors

[![dimsav](https://avatars.githubusercontent.com/u/1785686?v=4)](https://github.com/dimsav "dimsav (36 commits)")

---

Tags

zipcompresszipper

### Embed Badge

![Health badge](/badges/dimsav-unix-zipper/health.svg)

```
[![Health](https://phpackages.com/badges/dimsav-unix-zipper/health.svg)](https://phpackages.com/packages/dimsav-unix-zipper)
```

###  Alternatives

[alchemy/zippy

Zippy, the archive manager companion

47723.2M52](/packages/alchemy-zippy)[tubalmartin/cssmin

A PHP port of the YUI CSS compressor

23142.7M63](/packages/tubalmartin-cssmin)[pclzip/pclzip

A PHP library that offers compression and extraction functions for Zip formatted archives

19313.2M4](/packages/pclzip-pclzip)[spatie/laravel-personal-data-export

Create personal data downloads in a Laravel app

548569.8k9](/packages/spatie-laravel-personal-data-export)[voku/html-min

HTML Compressor and Minifier

1814.9M58](/packages/voku-html-min)[mrclay/jsmin-php

Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.

5213.7M27](/packages/mrclay-jsmin-php)

PHPackages © 2026

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