Skip to content

SimpleZip is fast and format-conforming PHP library to create ZIP archives

License

Notifications You must be signed in to change notification settings

offshore/simplezip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SimpleZip

SimpleZip is fast and format-conforming PHP library to create ZIP archives.

For now it's just a small class from one of my projects, it has not been widely tested and ::create() function does not check input for all error cases. Please report bugs, suggestions and feature requests to [email protected]

Features

Feature ZipArchive SimpleZip
create archives yes yes
update archives yes no
extract archives yes no
utf8 file names no yes
create without temporary outfile no yes
create files in one pass no yes
support adding files larger than php allowed memory no yes
global compression method selection no yes
per-file compression method selection no yes

Usage

require_once 'SimpleZip.php'; // or autoload if you will

$files = array (
    'LICENSE.txt' => 'LICENSE', // note different names
    'README.md' => array(
        'src' => 'README.md',
        'info' => 'Test file info',
        'method' => SimpleZip::CM_DEFLATE,
    )
);
$opts = array(
    'info' => 'Test global info',
    'method' => SimpleZip::CM_STORE,
);
if (!SimpleZip::create('test.zip', $files, $opts, $error)) {
    echo "Error: $error\n";
}

About

SimpleZip is fast and format-conforming PHP library to create ZIP archives

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages