PHPackages                             takuya/php-7z-cmd-wrapper - 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. takuya/php-7z-cmd-wrapper

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

takuya/php-7z-cmd-wrapper
=========================

7z Archiver Command Wrapper

0.1.2(1y ago)0120GPL-3.0-or-laterPHPPHP &gt;=7.3CI passing

Since Jun 17Pushed 4d ago1 watchersCompare

[ Source](https://github.com/takuya/php-7z-cmd-wrapper)[ Packagist](https://packagist.org/packages/takuya/php-7z-cmd-wrapper)[ RSS](/packages/takuya-php-7z-cmd-wrapper/feed)WikiDiscussions master Synced today

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

7-Zip command wrapper for reading
---------------------------------

[](#7-zip-command-wrapper-for-reading)

[![](https://github.com/takuya/php-7z-cmd-wrapper/workflows/main/badge.svg)](https://github.com/takuya/php-7z-cmd-wrapper/workflows/main/badge.svg)

7z command supports several type of archive.

requirements
------------

[](#requirements)

```
sudo apt install p7zip-full

```

rar will be installed as non-free

```
sudo apt install p7zip-rar # debian non-free

```

usage
-----

[](#usage)

Access with file name.

```
$a7z = new Archive7zReader("sample.zip");
foreach( $a7z->files() as $name) {
  $bin = $a7z->content($name);
}
```

Access with index.

```
$a7z = new Archive7zReader("sample.zip");
$bin = $a7z->at(0);
```

### limitations

[](#limitations)

currently, this project aimed at READING archive. write/append not yet.

### character encodings.(reading archive)

[](#character-encodingsreading-archive)

`7z` command will encode filenames by shell ENV\[LANG\]. So we should take care of encoding using shell env LANG='XXX' and php mb\_string.

cp932(jp/windows/filename) example. #01 using utf8

```
$a = new Archive7zReader($f);
$a->setLang('ja_JP.UTF8');
$file_name = $a->files()[1];
$file_name =   $name = mb_convert_encoding($file_name,"UTF8","UTF8,CP932");
```

cp932(jp/windows/filename) example. #02 using cp932

```
$a = new Archive7zReader($f);
$a->setLang('ja_JP.SJIS');
$file_name = $a->files()[1];
$file_name =   $name = mb_convert_encoding($file_name,"UTF8","CP932");
```

Installation from github
------------------------

[](#installation-from-github)

```
repo=git@github.com:takuya/php-7z-cmd-wrapper.git
composer config repositories.takuya/php-7z-cmd-wrapper vcs $repo
composer require takuya/php-7z-cmd-wrapper

```

Installation from packagist
---------------------------

[](#installation-from-packagist)

```
composre require takuya/php-7z-cmd-wrapper

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance72

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

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

Total

2

Last Release

578d ago

### Community

Maintainers

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

---

Top Contributors

[![takuya](https://avatars.githubusercontent.com/u/55338?v=4)](https://github.com/takuya "takuya (127 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/takuya-php-7z-cmd-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/takuya-php-7z-cmd-wrapper/health.svg)](https://phpackages.com/packages/takuya-php-7z-cmd-wrapper)
```

PHPackages © 2026

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