If on your site there is a possibility of uploading of archives and you would like to add functionality of their automatic unpacking and viewing with no dependency on format of the archive, you can use this library.
Short description of UnifiedArchive library:
UnifiedArchive - unified interface to archive (zip # 7z # rar # gz # bz2 # xz # tar # tar.gz # tar.bz2 # tar.xz # tar.Z # iso-9660) for listing, reading, extracting and creation + built-in console packer and unpacker + fully implemented PclZip-like interface (create, listContent, extract, properties, add, delete, merge, duplicate).
- Composer package -
- Latest release -
- Development branch -
Supported archive types:
- rar RAR extension
- 7z gemorroj/archive7z
- zip ZIP extension
- gz ZLIB extension
- bz2 BZ2 extension
- xz XZ extension
- tar without and with compression. Compression methods:
- gzip (.tar.gz) ZLIB extension
- bzip(.tar.bz2) BZIP extension
- lzma2 (.tar.xz) XZ extension
- lzw (.tar.Z) ncompress
- Adding files in archive.
- Deleting files from archive.
Fixed discovering 7z archive number of files and creating new archive.
Support for 7z (7zip) archives.
Support for single-file bz2 (bzip2) and xz (lzma2) archives.
- archive_tar is no longer a required package, now it is a suggestion.
- UnifiedArchive released under the MIT license.
The preferred way to install this extension is through composer.
$ php composer.phar require wapmorgan/unified-archive "0.0.6"
to the require section of your composer.json file.