{"id":16414624,"url":"https://github.com/wapmorgan/unifiedarchive","last_synced_at":"2025-04-13T14:04:22.918Z","repository":{"id":458489,"uuid":"22956256","full_name":"wapmorgan/UnifiedArchive","owner":"wapmorgan","description":"UnifiedArchive - an archive manager with unified interface for different formats (bundled with cli utility). Supports all formats with basic operations (reading, extracting and creation) and popular formats specific features (compression level, password-protection, comment)","archived":false,"fork":false,"pushed_at":"2025-02-16T21:36:59.000Z","size":13830,"stargazers_count":276,"open_issues_count":9,"forks_count":22,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-13T14:04:03.661Z","etag":null,"topics":["7zip","archives","archiving","bz2","bzip2","cab","gzip","iso","lzma2","manipulate-archives","rar","tar","zip"],"latest_commit_sha":null,"homepage":"http://wapmorgan.github.io/UnifiedArchive/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wapmorgan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-14T14:14:57.000Z","updated_at":"2025-03-03T14:07:56.000Z","dependencies_parsed_at":"2024-06-22T00:42:07.875Z","dependency_job_id":"145c6b4d-f7b6-4702-b615-281d9744907b","html_url":"https://github.com/wapmorgan/UnifiedArchive","commit_stats":{"total_commits":423,"total_committers":7,"mean_commits":60.42857142857143,"dds":0.01891252955082745,"last_synced_commit":"3fc76bbe24e5ff4789738dd7ee5fb01307ae3021"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FUnifiedArchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FUnifiedArchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FUnifiedArchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FUnifiedArchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wapmorgan","download_url":"https://codeload.github.com/wapmorgan/UnifiedArchive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724640,"owners_count":21151561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7zip","archives","archiving","bz2","bzip2","cab","gzip","iso","lzma2","manipulate-archives","rar","tar","zip"],"created_at":"2024-10-11T06:54:39.723Z","updated_at":"2025-04-13T14:04:22.899Z","avatar_url":"https://github.com/wapmorgan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"*UnifiedArchive* - an archive manager with unified interface for different formats that works on \nwide variety of system configuration. It supports all basic operations on widespread formats and\nsome format-specific features for most popular ones (zip, rar, 7z, tar).\n\nMain purpose of this library is to create unified interface for popular archive formats, that works in\nvarious system configurations via different drivers, when there is no ability to update system configuration, when code\ndelivered to another system configurations, or when you just want to install libraries and work. It's handy when there's \nneed to support archive types regardless of the system configuration.\n\n[![Latest Stable Version](https://poser.pugx.org/wapmorgan/unified-archive/v/stable)](https://packagist.org/packages/wapmorgan/unified-archive)\n[![Total Downloads](https://poser.pugx.org/wapmorgan/unified-archive/downloads)](https://packagist.org/packages/wapmorgan/unified-archive)\n[![Daily Downloads](https://poser.pugx.org/wapmorgan/unified-archive/d/daily)](https://packagist.org/packages/wapmorgan/unified-archive)\n[![License](https://poser.pugx.org/wapmorgan/unified-archive/license)](https://packagist.org/packages/wapmorgan/unified-archive)\n[![Latest Unstable Version](https://poser.pugx.org/wapmorgan/unified-archive/v/unstable)](https://packagist.org/packages/wapmorgan/unified-archive)\n\nTests \u0026 Quality: [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wapmorgan/UnifiedArchive/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wapmorgan/UnifiedArchive/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/wapmorgan/UnifiedArchive/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wapmorgan/UnifiedArchive/?branch=master)\n\n1. [Functions \u0026 Features](#functions--features)\n2. [How it works](#how-it-works)\n3. [Quick start](#quick-start)\n4. [Built-in console archive manager](#built-in-console-archive-manager)\n5. [Usage](docs/Usage.md)\n6. [Drivers \u0026 formats](docs/Drivers.md)\n7. [Full API description](docs/API.md)\n8. [Changelog](CHANGELOG.md)\n\n# Functions \u0026 Features\nUnifiedArchive is aimed to provide all operations on popular archive formats (zip, tar, rar, 7z) by all means and at\nbetter performance (depends on your OS/PHP configuration). Also, it allows to work with less popular archive types\n(with lack of functions).\n\nMain functions:\n- Open an archive with automatic format detection (more 20 formats).\n- List archive content, calculate original size of archive\n- Get details (original size, date of modification) of every archived file. Extract or stream archived file content\n- Extract all archive content. Append an archive with new files or directories. Remove files from archive\n- Create new archives with files/directories on disk and stream from memory\n- Fully implemented [PclZip-like interface for archives](docs/API.md#UnifiedArchive--getPclZipInterface) for all formats. Easy transition from old PclZip.\n- Bundled with cli utility\n\nSpecific functions:\n- Read (zip, rar) \u0026 set (zip) archive comment\n- [Open archives encrypted with password (zip, rar, 7z)](docs/API.md#UnifiedArchive--open)\n- Set passwords (7z, zip) for new archives\n- [Adjust compression level (zip, gzip, 7zip)](docs/API.md#UnifiedArchive--archiveFiles) for new archives\n\n# How it works\nUnifiedArchive uses \"drivers\", which can be one of types:\n1. PHP Extensions\n2. Utilities + bridge\n3. Pure PHP\n\nBy default, UA goes top-down to select first available driver for passed archive. So, PHP Extension driver will be used (if available), then Utilities + bridge driver (if available), and then Pure PHP driver.\n\nThere is at least one driver in all three types, which handles **zip** format, so this format can be fully supported in any OS/PHP configuration:\n1. PHP extensions: zip / phar \n2. Utility + bridge: SevenZip / AlchemyZippy\n3. Pure: NelexaZip / SplitbrainPhpArchive\n\n**tar** format (with compressed variants) supported by:\n1. PHP extension: phar\n2. Utility + bridge: SevenZip / AlchemyZippy\n3. Pure: TarByPear / SplitbrainPhpArchive\n\n**So, there is always one driver that supports popular formats, and you should not remember how to work with this concrete\ndriver (zip/phar/SevenZip/AlchemyZippy/NelexaZip/SplitbrainPhpArchive), interface for them is uniform.**\n\n# Quick start\n\n## Installation and configuration\n### Install library\n```sh\ncomposer require wapmorgan/unified-archive\n#Check supported formats with installed drivers\n./vendor/bin/cam system:formats\n#Check supported functions for zip format\n./vendor/bin/cam system:format zip\n```\n\n### Install new driver\n```sh\n#Read installation instructions from\n./vendor/bin/cam system:drivers\n#install missing drivers, for example pear/archive_tar\ncomposer require pear/archive_tar\n#check out driver functions\n./vendor/bin/cam system:formats TarByPear\n\n#if needed, install extensions, cli tools and php libraries\n#to enable support of other formats\n```\n\n## Usage\n\n* [Full usage](docs/Usage.md)\n* [Drivers \u0026 formats](docs/Drivers.md)\n* [Full API description](docs/API.md)\n* [Changelog](CHANGELOG.md)\n\n```php\nuse \\wapmorgan\\UnifiedArchive\\UnifiedArchive;\n$output_dir = '/var/www/extracted';\n# Extraction\n$archive = UnifiedArchive::open('archive.zip'); // archive.rar, archive.tar.bz2\nif (disk_free_space($output_dir) \u003c $archive-\u003egetOriginalSize()) {\n    throw new \\RuntimeException('No needed space available. Need ' . ($archive-\u003egetOriginalSize() - disk_free_space($output_dir)) . ' byte(s) more');\n}\n$extracted = $archive-\u003eextract($output_dir);\necho 'Number of extracted files' . $extracted.PHP_EOL;\n\n# Archiving\nUnifiedArchive::create([\n    'README.md' =\u003e '/default/path/to/README.md',\n    '' =\u003e '/folder/with/content/',\n], 'archive.zip');\n```\n\n# Built-in console archive manager\nUnifiedArchive is distributed with a unified console program to manipulate archives.\nIt supports all formats and all operations on them that UnifiedArchive does, so it can be used to manipulate\narchives without other system software. To show help, launch it:\n```shell\n./vendor/bin/cam list # help\n./vendor/bin/cam archive:info archive.tar.gz # archive information\n./vendor/bin/cam files:list -l archive.tar.gz # files list (or files:table for table)\n./vendor/bin/cam archive:extract archive.tar.gz ./OUTPUT/ # extraction all archive\n./vendor/bin/cam archive:create --compression=maximum archive2.tar.gz ./OUTPUT/partners # archive creation from files\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapmorgan%2Funifiedarchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwapmorgan%2Funifiedarchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapmorgan%2Funifiedarchive/lists"}