{"id":15034539,"url":"https://github.com/maennchen/zipstream-php","last_synced_at":"2025-05-14T22:06:46.933Z","repository":{"id":441778,"uuid":"14364426","full_name":"maennchen/ZipStream-PHP","owner":"maennchen","description":":floppy_disk: PHP ZIP Streaming Library","archived":false,"fork":false,"pushed_at":"2025-05-12T04:49:41.000Z","size":558,"stargazers_count":1825,"open_issues_count":3,"forks_count":108,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-05-14T22:06:36.932Z","etag":null,"topics":["php","stream","stream-http","streaming-zip","zip","zipstream-php"],"latest_commit_sha":null,"homepage":"https://maennchen.dev/ZipStream-PHP/","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/maennchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"maennchen"}},"created_at":"2013-11-13T13:16:48.000Z","updated_at":"2025-05-14T04:40:08.000Z","dependencies_parsed_at":"2024-01-13T01:24:39.659Z","dependency_job_id":"df55695d-4540-4bb7-83fb-1d51581fd5e8","html_url":"https://github.com/maennchen/ZipStream-PHP","commit_stats":{"total_commits":263,"total_committers":39,"mean_commits":6.743589743589744,"dds":0.5741444866920152,"last_synced_commit":"bd75c43fcc6285193866b54fea610bc23669aa66"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maennchen%2FZipStream-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maennchen%2FZipStream-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maennchen%2FZipStream-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maennchen%2FZipStream-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maennchen","download_url":"https://codeload.github.com/maennchen/ZipStream-PHP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235695,"owners_count":22036963,"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":["php","stream","stream-http","streaming-zip","zip","zipstream-php"],"created_at":"2024-09-24T20:25:26.540Z","updated_at":"2025-05-14T22:06:41.903Z","avatar_url":"https://github.com/maennchen.png","language":"PHP","readme":"# ZipStream-PHP\n\n[![Main Branch](https://github.com/maennchen/ZipStream-PHP/actions/workflows/branch_main.yml/badge.svg)](https://github.com/maennchen/ZipStream-PHP/actions/workflows/branch_main.yml)\n[![Coverage Status](https://coveralls.io/repos/github/maennchen/ZipStream-PHP/badge.svg?branch=main)](https://coveralls.io/github/maennchen/ZipStream-PHP?branch=main)\n[![Latest Stable Version](https://poser.pugx.org/maennchen/zipstream-php/v/stable)](https://packagist.org/packages/maennchen/zipstream-php)\n[![Total Downloads](https://poser.pugx.org/maennchen/zipstream-php/downloads)](https://packagist.org/packages/maennchen/zipstream-php)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9524/badge)](https://www.bestpractices.dev/projects/9524)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/maennchen/ZipStream-PHP/badge)](https://scorecard.dev/viewer/?uri=github.com/maennchen/ZipStream-PHP)\n\n## Unstable Branch\n\nThe `main` branch is not stable. Please see the\n[releases](https://github.com/maennchen/ZipStream-PHP/releases) for a stable\nversion.\n\n## Overview\n\nA fast and simple streaming zip file downloader for PHP. Using this library will\nsave you from having to write the Zip to disk. You can directly send it to the\nuser, which is much faster. It can work with S3 buckets or any PSR7 Stream.\n\nPlease see the [LICENSE](LICENSE) file for licensing and warranty information.\n\n## Installation\n\nSimply add a dependency on maennchen/zipstream-php to your project's\n`composer.json` file if you use Composer to manage the dependencies of your\nproject. Use following command to add the package to your project's dependencies:\n\n```bash\ncomposer require maennchen/zipstream-php\n```\n\n## Usage\n\nFor detailed instructions, please check the\n[Documentation](https://maennchen.github.io/ZipStream-PHP/).\n\n```php\n// Autoload the dependencies\nrequire 'vendor/autoload.php';\n\n// create a new zipstream object\n$zip = new ZipStream\\ZipStream(\n    outputName: 'example.zip',\n\n    // enable output of HTTP headers\n    sendHttpHeaders: true,\n);\n\n// create a file named 'hello.txt'\n$zip-\u003eaddFile(\n    fileName: 'hello.txt',\n    data: 'This is the contents of hello.txt',\n);\n\n// add a file named 'some_image.jpg' from a local file 'path/to/image.jpg'\n$zip-\u003eaddFileFromPath(\n    fileName: 'some_image.jpg',\n    path: 'path/to/image.jpg',\n);\n\n// finish the zip stream\n$zip-\u003efinish();\n```\n\n## Questions\n\n**💬 Questions? Please Read This First!**\n\nIf you have a question about using this library, please *do not email the\nauthors directly*. Instead, head over to the\n[GitHub Discussions](https://github.com/maennchen/ZipStream-PHP/discussions)\npage — your question might already be answered there! Using Discussions helps\nbuild a shared knowledge base, so others can also benefit from the answers. If\nyou need dedicated 1:1 support, check out the options available on\n[@maennchen's sponsorship page](https://github.com/sponsors/maennchen?frequency=one-time\u0026sponsor=maennchen).\n\n## Upgrade to version 3.1.2\n\n- Minimum PHP Version: `8.2`\n\n## Upgrade to version 3.0.0\n\n### General\n\n- Minimum PHP Version: `8.1`\n- Only 64bit Architecture is supported.\n- The class `ZipStream\\Option\\Method` has been replaced with the enum\n  `ZipStream\\CompressionMethod`.\n- Most clases have been flagged as `@internal` and should not be used from the\n  outside.\n  If you're using internal resources to extend this library, please open an\n  issue so that a clean interface can be added \u0026 published.\n  The externally available classes \u0026 enums are:\n  - `ZipStream\\CompressionMethod`\n  - `ZipStream\\Exception*`\n  - `ZipStream\\ZipStream`\n\n### Archive Options\n\n- The class `ZipStream\\Option\\Archive` has been replaced in favor of named\n  arguments in the `ZipStream\\ZipStream` constuctor.\n- The archive options `largeFileSize` \u0026 `largeFileMethod` has been removed. If\n  you want different `compressionMethods` based on the file size, you'll have to\n  implement this yourself.\n- The archive option `httpHeaderCallback` changed the type from `callable` to\n  `Closure`.\n- The archive option `zeroHeader` has been replaced with the option\n  `defaultEnableZeroHeader` and can be overridden for every file. Its default\n  value changed from `false` to `true`.\n- The archive option `statFiles` was removed since the library no longer checks\n  filesizes this way.\n- The archive option `deflateLevel` has been replaced with the option\n  `defaultDeflateLevel` and can be overridden for every file.\n- The first argument (`name`) of the `ZipStream\\ZipStream` constuctor has been\n  replaced with the named argument `outputName`.\n- Headers are now also sent if the `outputName` is empty. If you do not want to\n  automatically send http headers, set `sendHttpHeaders` to `false`.\n\n### File Options\n\n- The class `ZipStream\\Option\\File` has been replaced in favor of named\n  arguments in the `ZipStream\\ZipStream-\u003eaddFile*` functions.\n- The file option `method` has been renamed to `compressionMethod`.\n- The file option `time` has been renamed to `lastModificationDateTime`.\n- The file option `size` has been renamed to `maxSize`.\n\n## Upgrade to version 2.0.0\n\nhttps://github.com/maennchen/ZipStream-PHP/tree/2.0.0#upgrade-to-version-200\n\n## Upgrade to version 1.0.0\n\nhttps://github.com/maennchen/ZipStream-PHP/tree/2.0.0#upgrade-to-version-100\n\n## Contributing\n\nZipStream-PHP is a collaborative project. Please take a look at the\n[.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) file.\n\n## Version Support\n\nVersions are supported according to the table below.\n\nPlease do not open any pull requests contradicting the current version support\nstatus.\n\nCareful: Always check the `README` on `main` for up-to-date information.\n\n| Version | New Features | Bugfixes | Security |\n|---------|--------------|----------|----------|\n| *3*     | ✓            | ✓        | ✓        |\n| *2*     | ✗            | ✗        | ✓        |\n| *1*     | ✗            | ✗        | ✗        |\n| *0*     | ✗            | ✗        | ✗        |\n\nThis library aligns itself with the PHP core support. New features and bugfixes\nwill only target PHP versions according to their current status.\n\nSee: https://www.php.net/supported-versions.php\n\n## About the Authors\n\n- Paul Duncan \u003cpabs@pablotron.org\u003e - https://pablotron.org/\n- Jonatan Männchen \u003cjonatan@maennchen.ch\u003e - https://maennchen.dev\n- Jesse G. Donat \u003cdonatj@gmail.com\u003e - https://donatstudios.com\n- Nicolas CARPi \u003cnico-git@deltablot.email\u003e - https://www.deltablot.com\n- Nik Barham \u003cnik@brokencube.co.uk\u003e - https://www.brokencube.co.uk\n","funding_links":["https://github.com/sponsors/maennchen","https://github.com/sponsors/maennchen?frequency=one-time\u0026sponsor=maennchen"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaennchen%2Fzipstream-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaennchen%2Fzipstream-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaennchen%2Fzipstream-php/lists"}