PHPackages                             andriell/tar - 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. andriell/tar

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

andriell/tar
============

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

v1.0.7(8y ago)22.4kBSD-3-ClausePHPPHP &gt;=5.3.0

Since Jul 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/andriell/php-tar)[ Packagist](https://packagist.org/packages/andriell/tar)[ Docs](https://github.com/andriell/php-tar)[ RSS](/packages/andriell-tar/feed)WikiDiscussions master Synced 4w ago

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

php-tar
=======

[](#php-tar)

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

Example 1
=========

[](#example-1)

Add a large file to standard output

```
$echoWriter = new EchoWriter();
$tar = new Tar($echoWriter);
$tar->addBigFile('big_file.avi');
$tar->addBigFile('big_file2.avi', 'new/file/name.avi');
$tar->close();

```

Example 2
=========

[](#example-2)

Write tar gz to file

```
$stringWriter = new FileGzWriter(__DIR__ . '/test.tar.gz');
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();

```

Example 3
=========

[](#example-3)

Write tar to file

```
$stringWriter = new FileWriter(__DIR__ . '/test.tar');
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();

```

Example 4
=========

[](#example-4)

Write tar gz to string

```
$stringWriter = new StringGzWriter();
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();
$tarString = $stringWriter->getDate();

```

Example 5
=========

[](#example-5)

Write tar to string

```
$stringWriter = new StringWriter();
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();
$tarString = $stringWriter->getDate();

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/284e5878cad7573891407697c19fafd47dd403ed7fbd323927291e1915cbdf01?d=identicon)[andriell](/maintainers/andriell)

---

Top Contributors

[![andriell](https://avatars.githubusercontent.com/u/7204224?v=4)](https://github.com/andriell "andriell (16 commits)")

---

Tags

compressionarchivetartar.gz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andriell-tar/health.svg)

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

###  Alternatives

[wapmorgan/unified-archive

UnifiedArchive - an archive manager with unified interface of working with all popular archive formats (zip/7z/rar/gz/bz2/xz/cab/tar/tar.gz/tar.bz2/tar.x/tar.Z/...) for PHP with ability for listing, reading, extracting and creation + built-in console archive manager.

2811.8M7](/packages/wapmorgan-unified-archive)[raulfraile/distill

Smart compressed files extractor

228196.2k9](/packages/raulfraile-distill)[pear/archive_tar

Tar file management class with compression support (gzip, bzip2, lzma2)

7665.3M87](/packages/pear-archive-tar)[nelexa/zip

PhpZip is a php-library for extended work with ZIP-archives. Open, create, update, delete, extract and get info tool. Supports appending to existing ZIP files, WinZip AES encryption, Traditional PKWARE Encryption, BZIP2 compression, external file attributes and ZIP64 extensions. Alternative ZipArchive. It does not require php-zip extension.

5168.0M135](/packages/nelexa-zip)[splitbrain/php-archive

Pure-PHP implementation to read and write TAR and ZIP archives

1121.5M24](/packages/splitbrain-php-archive)[phpzip/phpzip

Package to create and stream archives of compressed files in ZIP format with PHP 5.3+

124897.5k9](/packages/phpzip-phpzip)

PHPackages © 2026

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