Recommend this page to a friend! |
Download .zip |
Info | Example | View files (24) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-01-09 (4 days ago) | Not yet rated by the users | Total: 321 This week: 4 | All time: 7,212 This week: 89 |
Version | License | PHP version | Categories | |||
php-zip-merge 1.0.12 | GNU Lesser Genera... | 5.3 | PHP 5, Files and Folders, Compression |
Description | Authors Contributor | ||||||||||||||||
This class can merge and stream multiple ZIP files into a single ZIP file without compressing again the files contained in the archives. Innovation Award
|
|
<?php |
Combine and stream the contents of multiple existing Zip files, as a single file, without recompressing the data within.
This is useful if you have often used static content that needs to be collected and sent to the client. With this you can pre-compress these packages, and assemble them on the fly, saving CPU cycles by not having to do the compression every time the files are requested.
The contents of each Zip file added, can even be placed in separate sub folders.
Add this requirement to your composer.json
file:
"grandt/phpzipmerge": ">=1.0.4"
If you already have Composer installed, skip this part.
Packagist, the main composer repository has a neat and very short guide.
Or you can look at the guide at the Composer site.
The easiest for first time users, is to have the composer installed in the same directory as your composer.json file, though there are better options.
Run this from the command line:
php -r "readfile('https://getcomposer.org/installer');" | php
This will check your PHP installation, and download the composer.phar
, which is the composer binary. This file is not needed on the server though.
Once composer is installed you can create the composer.json
file to import this package.
{
"require": {
"grandt/phpzipmerge": ">=1.0.4",
"php": ">=5.3.0"
}
}
Followed by telling Composer to install the dependencies.
php composer.phar install
this will download and place all dependencies defined in your composer.json
file in the vendor
directory.
Finally, you include the autoload.php
file in the new vendor
directory.
<?php
require 'vendor/autoload.php';
.
.
.
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (2 files) | ||||
composer.json | Data | Composer.json file | ||
README.md | Data | Readme | ||
REVISION.TXT | Data | Revision history |
Files | / | src | / | ZipMerge | / | Zip | / | Core |
File | Role | Description | ||
---|---|---|---|---|
ExtraField (6 files) | ||||
Header (3 files) | ||||
AbstractException.php | Class | Class file | ||
AbstractZipWriter.php | Class | Class file | ||
ZipUtils.php | Class | Class file |
Files | / | src | / | ZipMerge | / | Zip | / | Core | / | ExtraField |
File | Role | Description |
---|---|---|
AbstractExtraField.php | Class | Class file |
AbstractUnicodeExtraField.php | Class | Class file |
ExtendedTimeStampExtraField.php | Class | Class file |
GenericExtraField.php | Class | Class file |
UnicodeCommentExtraField.php | Class | Class file |
UnicodePathExtraField.php | Class | Class file |
Files | / | src | / | ZipMerge | / | Zip | / | Core | / | Header |
File | Role | Description |
---|---|---|
AbstractZipHeader.php | Class | Class file |
EndOfCentralDirectory.php | Class | Class file |
ZipFileEntry.php | Class | Class file |
Files | / | src | / | ZipMerge | / | Zip | / | Exception |
File | Role | Description |
---|---|---|
BufferNotEmpty.php | Class | Class file |
HeaderPositionError.php | Class | Class file |
HeadersSent.php | Class | Class file |
IncompatiblePhpVersion.php | Class | Class file |
Files | / | src | / | ZipMerge | / | Zip | / | File |
File | Role | Description |
---|---|---|
ZipMergeToFile.php | Class | Stepping to version 1.0.2 Added class to write to file ZipMerge always streams to the client, the new ZipMergeToFile will write directly to a file instead, phpclasses accidentally said the package could do this... :P |
Files | / | src | / | ZipMerge | / | Zip | / | Listener |
File | Role | Description |
---|---|---|
ZipArchiveListener.php | Class | Class file |
Files | / | tests |
File | Role | Description |
---|---|---|
MergeZip.Example1.php | Example | Example showing the use of the ZipMerge Class |
MergeZip.File.Example1.php | Example | Stepping to version 1.0.2 Added class to write to file ZipMerge always streams to the client, the new ZipMergeToFile will write directly to a file instead, phpclasses accidentally said the package could do this... :P |
php-zip-merge-2024-01-09.zip 26KB | |
php-zip-merge-2024-01-09.tar.gz | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
Relative Path | .zip .tar.gz | Clean and manage paths before adding them to the zip file | Required |
Bin String | .zip .tar.gz | Work around cases where mbstring.func_overload is enabled | Required |
Version Control | Reuses | Unique User Downloads | Download Rankings | ||||||||||||||||
100% | 1 |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Other classes that need this package |
Class | Why it is needed | Dependency |
---|---|---|
Zip Stream | Used by the appendZip function | Conditional |