Class Zip
Class Zip
Creates or extracts Zip archives
for specs see http://www.pkware.com/appnote
- splitbrain\PHPArchive\Archive
-
splitbrain\PHPArchive\Zip
Namespace: splitbrain\PHPArchive
Package: splitbrain\PHPArchive
License: MIT
Author: Andreas Gohr andi@splitbrain.org
Located at Zip.php
Package: splitbrain\PHPArchive
License: MIT
Author: Andreas Gohr andi@splitbrain.org
Located at Zip.php
public
|
#
setCompression( integer $level = 9, integer $type = Archive::COMPRESS_AUTO )
Set the compression level. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
addFile( string $file, string|
Add a file to the current archive using an existing file in the filesystem |
public
|
#
addData( string|
Add a file to the current Zip archive using the given $data as content |
public
|
|
public
|
|
public
|
|
protected
array
|
|
protected
array
|
|
protected
array
|
|
protected
array
|
|
protected
|
|
protected
string
|
|
protected
string
|
|
protected
integer
|
|
protected
integer
|
|
protected
integer
|
|
protected
integer
|
|
protected
string
|
#
makeCentralFileRecord( integer $offset, integer $ts, integer $crc, integer $len, integer $clen, string $name, boolean|null $comp = null )
Returns a local file header for the given data |
protected
string
|
#
makeLocalFileHeader( integer $ts, integer $crc, integer $len, integer $clen, string $name, boolean|null $comp = null )
Returns a local file header for the given data |
protected
array($filename,
|
setCallback()
|
COMPRESS_AUTO,
COMPRESS_BZIP,
COMPRESS_GZIP,
COMPRESS_NONE
|
protected
string
|
$file
|
#
''
|
protected
|
$fh
|
|
protected
string
|
$memory
|
#
''
|
protected
boolean
|
$closed
|
#
true
|
protected
boolean
|
$writeaccess
|
#
false
|
protected
|
$ctrl_dir
|
|
protected
integer
|
$complevel
|
#
9
|
$callback
|