zeebinz / rarinfo

Simple PHP scripts for inspecting RAR archives and associated files.
29 stars 9 forks source link

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] (https://github.com/zeebinz/rarinfo/releases) page for versioned releases of the whole library, which contains:

ArchiveReader

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

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.

RarInfo (extends ArchiveReader)

Class for inspecting the contents of RAR archives.

RarUnicodeFilename (in rarinfo.php)

Class for handling unicode filenames in RAR archive listings.

SfvInfo (extends ArchiveReader)

Class for inspecting the contents of SFV verification files.

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.

Par2Info (extends ArchiveReader)

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

ZipInfo (extends ArchiveReader)

Class for inspecting the contents of ZIP archives.

SzipInfo (extends ArchiveReader)

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

PipeReader

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

Testing

Some basic unit tests using PHPUnit 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 :)