PHPackages                             dariusiii/rarinfo - 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. dariusiii/rarinfo

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

dariusiii/rarinfo
=================

PHP archive reader helper class

v3.1(3mo ago)124.5k—5.9%11BSD-3-ClausePHPPHP &gt;=7.2.0 &lt;8.6.0

Since Apr 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/DariusIII/rarinfo)[ Packagist](https://packagist.org/packages/dariusiii/rarinfo)[ RSS](/packages/dariusiii-rarinfo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (18)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/0f0c63c499cff04ee382abe55f54f1cf72a00b009933d4fc57fa9262cbe5b701/68747470733a2f2f706f7365722e707567782e6f72672f6461726975736969692f726172696e666f2f762f737461626c65)](https://packagist.org/packages/dariusiii/rarinfo)[![Total Downloads](https://camo.githubusercontent.com/c9b0242d48b3fce81acb1ab70cf0fca2938f192415eb145c24c4efbbb6611aae/68747470733a2f2f706f7365722e707567782e6f72672f6461726975736969692f726172696e666f2f646f776e6c6f616473)](https://packagist.org/packages/dariusiii/rarinfo)[![License](https://camo.githubusercontent.com/83fd025437fa478ca6f9709b664cefeb1600f442721d57e2690a5b03f6de46dc/68747470733a2f2f706f7365722e707567782e6f72672f6461726975736969692f726172696e666f2f6c6963656e7365)](https://packagist.org/packages/dariusiii/rarinfo)

A set of basic utility classes for working with RAR archives and related parity and verification files in pure PHP (no external dependencies). See the \[Releases\] () page for versioned releases of the whole library, which contains:

ArchiveReader
-------------

[](#archivereader)

Abstract base class for the various file inspectors that defines the basic API and implements common methods for file/data handling.

- 3.1 Fixed compatability with Synology NAS
- 3.0 Fixed compatability with OSX
- 2.9 Added clearstatcache() to default reset
- 2.8 Changed getFileList() to return empty array on error
- 2.7 Added strposall() static method
- 2.6 Added methods for creating temporary files
- 2.5 Added support for ArchiveInfo
- 2.4 Fixed getting file sizes on Windows without com\_dotnet loaded
- 2.3 Cleaned up code, added convert2hex() method
- 2.2 Added support for Windows timestamps and some tweaks
- 2.1 Code cleanup, made file property protected
- 2.0 Made get/save range methods protected
- 1.9 Improved range checks
- 1.8 Added methods for getting &amp; saving file data by range
- 1.7 Added support for setting analysis byte ranges, improved handling of archive file fragments, added default constructor, and misc fixes.
- 1.6 Improved property initialization
- 1.5 Improved method for unpacking unsigned longs
- 1.4 Seeking in files beyond PHP\_INT\_MAX now throws exception
- 1.3 Improved filesize calculation for large files
- 1.2 Added dos2unixtime() from RarInfo
- 1.1 Added int64() method for handling 64-bit integers
- 1.0 Initial release (derived from RarInfo v2.8, with bugfixes)

ArchiveInfo (extends ArchiveReader)
-----------------------------------

[](#archiveinfo-extends-archivereader)

Example class that provides a facade for all the readers in the library, and also allows recursive inspection of archives packed within archives.

- 2.4 Fixed getReader() return type to support nullable ArchiveReader
- 2.3 Fixed empty() and isset() calls on reader properties
- 2.2 Added option to override extensions filter via setArchiveExtensions()
- 2.1 Added support for SzipInfo (7-zip archives)
- 2.0 Improved error reporting for recursive extraction
- 1.9 Added support for recursive extraction using external clients
- 1.8 Restricted stored archives to supported types only
- 1.7 Added ability to reset the readers list dynamically
- 1.6 Added method for setting the readers list per instance
- 1.5 Restricted next\_offset values to main archive files only
- 1.4 Added option for getArchiveFileList() to merge all archive file lists
- 1.3 Improved performance and error reporting
- 1.2 Fixed allowsRecursion() method to return only booleans
- 1.1 Fixed backward-compatibility with PHP &lt; 5.3.0
- 1.0 Initial release

RarInfo (extends ArchiveReader)
-------------------------------

[](#rarinfo-extends-archivereader)

Class for inspecting the contents of RAR archives.

- 5.9 Enhanced RAR 5.0 support with symlink/hardlink and Unix owner parsing
- 5.8 Fixed getFileList() to exclude service blocks (CMT, QO) from file list
- 5.7 Fixes out of memory error with corrupt RAR50 files, issue #9
- 5.6 Improved handling of corrupt RAR 5.0 archives
- 5.5 Fixed conversion of external client file paths
- 5.4 Added 'split\_after' field to file listing to assist CRC32 checks
- 5.3 Added CRC32 checksums to the file list output
- 5.2 Changed getFileList() to return empty array on error
- 5.1 Speeded up findFileHeader() method quite a bit
- 5.0 Improved handling of external clients, including Windows fix
- 4.9 Added option for extracting files with external clients
- 4.8 Tweaked File header sanity check
- 4.7 Added support for ArchiveInfo
- 4.6 Fixed handling of archives with encrypted headers
- 4.5 Improved handling of some corrupt sources
- 4.4 Improved analysis performance, cleaned up code, fixed b/c
- 4.3 Added handling of RAR 5.0 Quick Open data
- 4.2 Added basic support for the RAR 5.0 archive format
- 4.1 Added handling of zero-padded RAR files
- 4.0 Tweaked handing of file block headers and summaries
- 3.9 Improved methods for extracting file contents
- 3.8 Added support for byte ranges, better handling of RAR fragments
- 3.7 Added more info to Archive block output
- 3.6 Improved handling of Marker blocks, with new test files
- 3.5 Improved Marker block searching
- 3.4 Improved property initialization
- 3.3 Moved dos2unixtime() to ArchiveReader
- 3.2 Added RarInfo::getFileData() and RarInfo::saveFileData(); Data &amp; open file handles now persist until closed manually
- 3.1 Now uses ArchiveReader::int64() for handling 64-bit integers
- 3.0 Improved speed when handling RAR file fragments
- 2.9 Refactored quite a lot to allow easier extension
- 2.8 Added support for files larger than PHP\_INT\_MAX bytes
- 2.7 Fixed read &amp; seek issues
- 2.6 Improved input error checking, fixed reset bug
- 2.5 Code cleanup &amp; optimization, added fileCount
- 2.4 Better method for unpacking unsigned longs
- 2.3 Added skipping of directory entries, unicode fixes
- 2.2 Fixed some seeking issues, added more Archive End info
- 2.1 Better support for analyzing large files from disk via open()
- 2.0 Proper unicode support with ported UnicodeFilename class
- 1.9 Basic unicode support, fixed password &amp; salt info
- 1.8 Better info for multipart files, added PACK\_SIZE properly
- 1.7 Improved support for RAR file fragments
- 1.6 Added extra error checking to read method
- 1.5 Improved getSummary method output
- 1.4 Added filename sanity checks &amp; maxFilenameLength variable
- 1.3 Fixed issues with some file headers lacking LONG\_BLOCK flag
- 1.2 Tweaked seeking method
- 1.1 Fixed issues with PHP not handling unsigned longs properly (pfft)
- 1.0 Initial release

RarUnicodeFilename (in rarinfo.php)
-----------------------------------

[](#rarunicodefilename-in-rarinfophp)

Class for handling unicode filenames in RAR archive listings.

- 1.2 Fixed issues with byte processing
- 1.1 Renamed class to avoid collisions
- 1.0 Initial release

SfvInfo (extends ArchiveReader)
-------------------------------

[](#sfvinfo-extends-archivereader)

Class for inspecting the contents of SFV verification files.

- 2.1 Added extra check for correct file length
- 2.0 Changed getFileList() to return empty array on error
- 1.9 Added use\_range value to getSummary() output
- 1.8 Added support for ArchiveInfo
- 1.7 Added support for byte ranges
- 1.6 Fixed regex greediness with extra whitespaces
- 1.5 File comments are now stored
- 1.4 Now supports all line ending types
- 1.3 Improved check for valid SFV data only
- 1.2 Fixed last byte being discarded when analyzing
- 1.1 Results of getFileList() made consistent with other inspectors
- 1.0 Initial release

SrrInfo (extends RarInfo)
-------------------------

[](#srrinfo-extends-rarinfo)

Class for inspecting the contents of SRR files and reporting on the RAR files that they cover, as well as allowing extraction of any stored files that they might contain.

- 2.3 Changed getFileList() to return empty array on error
- 2.2 Tweak to support RarInfo 4.9
- 2.1 Added stricter check for SRR Marker block
- 2.0 Added support for ArchiveInfo
- 1.9 Improved analysis performance, cleaned up code
- 1.8 Added handling of OSO hash blocks
- 1.7 Improved handling of invalid extraction requests
- 1.6 Added support for byte ranges
- 1.5 Improved handling of Marker blocks
- 1.4 Improved Marker block searching
- 1.3 Improved property initialization
- 1.2 Data &amp; open file handles now persist until closed manually
- 1.1 Added easier reporting of client info
- 1.0 Initial release

Par2Info (extends ArchiveReader)
--------------------------------

[](#par2info-extends-archivereader)

Class for inspecting the contents of PAR2 parity files and reporting on the archives that they cover.

- 1.7 Changed getFileList() to return empty array on error
- 1.6 Added support for ArchiveInfo
- 1.5 Improved analysis performance
- 1.4 Added support for byte ranges
- 1.3 Added block count to file list entries
- 1.2 Improved property initialization
- 1.1 Fixed unpacking of unsigned longs
- 1.0 Initial release

ZipInfo (extends ArchiveReader)
-------------------------------

[](#zipinfo-extends-archivereader)

Class for inspecting the contents of ZIP archives.

- 2.1 Added CRC32 checksums to the file list output
- 2.0 Changed getFileList() to return empty array on error
- 1.9 Improved handling of external clients, including Windows fix
- 1.8 Added option for extracting files with external clients
- 1.7 Fixed finding the marker signature
- 1.6 Added support for ArchiveInfo
- 1.5 Improved analysis performance, cleaned up code
- 1.4 Improved methods for extracting file contents
- 1.3 Added support for byte ranges
- 1.2 Improved property initialization
- 1.1 Fixed filecount when CDR is missing
- 1.0 Initial release

SzipInfo (extends ArchiveReader)
--------------------------------

[](#szipinfo-extends-archivereader)

Class for inspecting the contents of 7-zip (.7z) archives.

- 1.5 Added support for additional compression methods (LZMA2, PPMd, BCJ, ARM, ZSTD, etc.)
- 1.4 Improved processing of substreams info
- 1.3 Fixed getPackedRanges() output
- 1.2 Added CRC32 checksums to the file list output
- 1.1 Fixed parsing of substream digests
- 1.0 Initial release

PipeReader
----------

[](#pipereader)

A utility class for handling the piped output of an external command.

- 1.2 Added readLine() method
- 1.1 Fixed visibility of pipe handle
- 1.0 Initial release

Testing
-------

[](#testing)

Some basic unit tests using [PHPUnit](https://phpunit.readthedocs.io/en/7.3/)are in `/tests`, with sample files in `/tests/fixtures` (run `generate.php` from there first and on each pull), more coverage and any Github-friendly samples are always welcome. Some optional tests require external binaries (see `/tests/bin/README.md`). Enjoy :)

Recent Compatibility Updates (February 2026)
--------------------------------------------

[](#recent-compatibility-updates-february-2026)

### RAR Format Support

[](#rar-format-support)

- **RAR 1.4, 1.5-4.x, and 5.0**: Fully supported across all versions
- **WinRAR 6.x and 7.x**: Compatible (use RAR 5.0 format internally)
- **Enhanced RAR 5.0 features**:
    - Symlink/hardlink support (Unix and Windows)
    - Unix owner information (UID/GID/username/groupname)
    - Nanosecond precision timestamps
    - Proper file list filtering (excludes comment and quick-open service blocks)

### 7-Zip Format Support

[](#7-zip-format-support)

- **Compression Methods**: Added support for LZMA2, PPMd, BCJ, BCJ2, ARM, ARMT, ARM64, BZIP2, DEFLATE, DEFLATE64, and Zstandard (ZSTD)
- **Archive Features**: Properly handles solid packs, encrypted headers, and multi-block archives

### PHP Compatibility

[](#php-compatibility)

- **PHP 7.2 - 8.5+**: Fully compatible with explicit nullable type declarations
- **PHPUnit 9.x**: All tests updated and compatible
- **Type Safety**: Enhanced type declarations throughout codebase

### Bug Fixes

[](#bug-fixes)

- Fixed `RarInfo::getFileList()` to properly exclude service blocks
- Fixed `SzipInfo` null-safety for file name parsing
- Fixed `ArchiveInfo::getReader()` nullable return type
- Enhanced error handling for missing or corrupt archive data

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75.1% 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 ~201 days

Recently: every ~562 days

Total

17

Last Release

101d ago

Major Versions

v2.7.6 → v3.02026-01-22

PHP version history (3 changes)v2.5.0PHP &gt;=5.6.0

v2.7.0PHP &gt;=7.2.0

v3.0PHP &gt;=7.2.0 &lt;8.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ab1ab6b00f6fd0010e38a3ba0ae92a716be659f72b6febbb6a24bb6d8a599ac?d=identicon)[DariusIII](/maintainers/DariusIII)

---

Top Contributors

[![zeebinz](https://avatars.githubusercontent.com/u/341424?v=4)](https://github.com/zeebinz "zeebinz (148 commits)")[![DariusIII](https://avatars.githubusercontent.com/u/3399658?v=4)](https://github.com/DariusIII "DariusIII (49 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dariusiii-rarinfo/health.svg)

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

###  Alternatives

[cocosmos/filament-quick-add-select

Instantly create and select new options in Filament relationship selects without opening modals

131.3k](/packages/cocosmos-filament-quick-add-select)

PHPackages © 2026

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