Skip to content

About

🚀 A fluent Laravel wrapper for ZipStream-PHP to easily generate and stream ZIP archives without temporary files.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel ZipStream - zero lag, zero disk, pure stream

Latest version Total downloads Tests Documentation PHP version License

Laravel ZipStream

A fluent Laravel wrapper for maennchen/zipstream-php to easily generate and stream ZIP archives.

Installation

composer require exeque/laravel-zipstream

The service provider registers itself. Upgrading from 0.x? See the upgrade guide.

Both of these are optional - the package works with its own defaults:

# Defaults for compression, progress reporting and size formatting
php artisan vendor:publish --tag="laravel-zipstream-config"

# The progress strings, shipped in 30 languages
php artisan vendor:publish --tag="laravel-zipstream-translations"

See Configuration for what each key does.

Basic Usage

use ExeQue\ZipStream\Facades\Zip;

// Stream an archive to the browser
return Zip::as('gallery.zip')
    ->fromDisk('s3', 'events/2026/photo.jpg')
    ->fromLocalDirectory('/var/exports/2026', 'exports')
    ->fromRaw('README.txt', 'Thanks for downloading!')
    ->toResponse();

// Or build it straight to a disk, while it uploads
Zip::fromDiskDirectory('s3', 'events/2026', 'gala')
    ->saveToDisk('s3', 'archives/gala.zip');

Nothing is buffered: an archive of any size streams at constant memory, whether it goes to the browser, a disk or a local path.

Documentation

Documentation: Here

Upgrading from 0.x? See the upgrade guide.

Testing

composer test

The S3 test for saveToDisk() is skipped unless an S3-compatible server is available. See Testing against S3 with MinIO to run it locally.

License

The MIT License (MIT). Please see License File for more information.

About

🚀 A fluent Laravel wrapper for ZipStream-PHP to easily generate and stream ZIP archives without temporary files.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages