{"id":15917499,"url":"https://github.com/takuya/php-7z-cmd-wrapper","last_synced_at":"2025-08-15T16:31:29.849Z","repository":{"id":37724110,"uuid":"398941187","full_name":"takuya/php-7z-cmd-wrapper","owner":"takuya","description":"7z Archiver Command Wrapper","archived":false,"fork":false,"pushed_at":"2025-08-08T05:39:17.000Z","size":547,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-08T07:26:59.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takuya.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2021-08-23T01:38:08.000Z","updated_at":"2025-08-08T05:39:20.000Z","dependencies_parsed_at":"2024-12-16T08:27:33.353Z","dependency_job_id":"25db9bb5-c8c7-4543-8276-0e97400f0510","html_url":"https://github.com/takuya/php-7z-cmd-wrapper","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"44e19aeb11b40e664c3414ce5fd8ac3300a9df22"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/takuya/php-7z-cmd-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-7z-cmd-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-7z-cmd-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-7z-cmd-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-7z-cmd-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takuya","download_url":"https://codeload.github.com/takuya/php-7z-cmd-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-7z-cmd-wrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269385311,"owners_count":24408411,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-06T18:11:02.042Z","updated_at":"2025-08-15T16:31:29.565Z","avatar_url":"https://github.com/takuya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 7-Zip command wrapper for reading\n![](https://github.com/takuya/php-7z-cmd-wrapper/workflows/main/badge.svg)\n\n\n7z command supports several type of archive. \n\n## requirements\n\n```\nsudo apt install p7zip-full\n```\n\nrar will be installed as non-free\n```\nsudo apt install p7zip-rar # debian non-free\n```\n## usage \nAccess with file name.\n```php\n$a7z = new Archive7zReader(\"sample.zip\");\nforeach( $a7z-\u003efiles() as $name) {\n  $bin = $a7z-\u003econtent($name);\n}\n```\nAccess with index.\n```php\n$a7z = new Archive7zReader(\"sample.zip\");\n$bin = $a7z-\u003eat(0);\n```\n\n### limitations \n\ncurrently, this project aimed at READING archive. write/append not yet.\n\n\n### character encodings.(reading archive)\n\n`7z` command will encode filenames by shell ENV[LANG].\nSo we should take care of encoding using shell env LANG='XXX' and php mb_string.\n\ncp932(jp/windows/filename) example. #01 using utf8 \n```php\n$a = new Archive7zReader($f);\n$a-\u003esetLang('ja_JP.UTF8');\n$file_name = $a-\u003efiles()[1];\n$file_name =   $name = mb_convert_encoding($file_name,\"UTF8\",\"UTF8,CP932\");\n```\ncp932(jp/windows/filename) example. #02 using cp932\n```php\n$a = new Archive7zReader($f);\n$a-\u003esetLang('ja_JP.SJIS');\n$file_name = $a-\u003efiles()[1];\n$file_name =   $name = mb_convert_encoding($file_name,\"UTF8\",\"CP932\");\n```\n\n\n## Installation from github \n```\nrepo=git@github.com:takuya/php-7z-cmd-wrapper.git\ncomposer config repositories.takuya/php-7z-cmd-wrapper vcs $repo\ncomposer require takuya/php-7z-cmd-wrapper\n```\n\n## Installation from packagist\n```\ncomposre require takuya/php-7z-cmd-wrapper\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuya%2Fphp-7z-cmd-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakuya%2Fphp-7z-cmd-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuya%2Fphp-7z-cmd-wrapper/lists"}