{"id":26360989,"url":"https://github.com/we7coreteam/w7-rangine-zipstream","last_synced_at":"2026-01-03T01:54:41.433Z","repository":{"id":62545940,"uuid":"241776901","full_name":"we7coreteam/w7-rangine-zipstream","owner":"we7coreteam","description":"ZipStream-PHP for Swoole","archived":false,"fork":false,"pushed_at":"2020-02-20T09:13:51.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-14T17:13:18.489Z","etag":null,"topics":["rangine","swoole","zipstream","zipstream-php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/we7coreteam.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}},"created_at":"2020-02-20T02:41:26.000Z","updated_at":"2020-02-21T08:52:01.000Z","dependencies_parsed_at":"2022-11-02T22:15:34.991Z","dependency_job_id":null,"html_url":"https://github.com/we7coreteam/w7-rangine-zipstream","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we7coreteam%2Fw7-rangine-zipstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we7coreteam%2Fw7-rangine-zipstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we7coreteam%2Fw7-rangine-zipstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/we7coreteam%2Fw7-rangine-zipstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/we7coreteam","download_url":"https://codeload.github.com/we7coreteam/w7-rangine-zipstream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902389,"owners_count":20366273,"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":["rangine","swoole","zipstream","zipstream-php"],"created_at":"2025-03-16T17:19:10.108Z","updated_at":"2026-01-03T01:54:41.383Z","avatar_url":"https://github.com/we7coreteam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 说明\n基于 [ZipStream-PHP](https://github.com/maennchen/ZipStream-PHP) 库，优化了对 Swoole 扩展的支持。\n\n# 使用\n\n配置 options 与原始库一样，只是需要指定 outputStream 为 Swoole Respons 对象。\n\n\\W7\\ZipStream\\ZipStream 对象继承自 \\ZipStream\\ZipStream 对象，只是重写了 Send 方法。\n使用方法与原始库一致。\n\n```\n$options = new \\ZipStream\\Option\\Archive();\n$options-\u003esetSendHttpHeaders(true);\n//指定 output 对象为 swoole response对象\n$options-\u003esetOutputStream($this-\u003eresponse());\n\n$zip = new \\W7\\ZipStream\\ZipStream('example.zip', $options);\nfor ($i=0; $i\u003c100000; $i++) {\n    $zip-\u003eaddFile($i, 'test');\n}\n\n$zip-\u003efinish();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwe7coreteam%2Fw7-rangine-zipstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwe7coreteam%2Fw7-rangine-zipstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwe7coreteam%2Fw7-rangine-zipstream/lists"}