프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$centralDirectory | |||
$fileHandle | |||
$fileHeaderAndData | |||
$localFileHeaderOffset |
메소드 | 설명 | |
---|---|---|
_checkLocalFileHeaderAndCentralDir ( unknown_type $localFileHeaderData, unknown_type $centralDirectoryData ) : boolean | 校验 'Local file header' 跟 'Central directory' | |
_checkZlib ( ) : boolean | 检查PHP zlib扩展有没有载入 | |
_findEOFCentralDirectoryRecord ( $filesize ) : string | 读取'end of central directory record'区块数据 | |
_getCentralDirectory ( $modTime, $modDate, $crc, $compressedSize, $unCompressedSize, $filenameLength, $fileHeaderLength, $filename ) : string | 组装 'Central directory' 区块数据 | |
_getDataDescriptor ( $crc, $compressedSize, $unCompressedSize ) : string | 组装 'Data descriptor' 区块数据 | |
_getDosFormatTime ( $timestamp ) : array | 格式化时间为DOS格式 | |
_readCentralDirectoryData ( ) : string | 读取'Central directory' 区块数据 | |
_readLocalFileHeaderAndData ( $centralDirectoryData ) : array | 取得压缩数据中的'Local file header'区块跟压缩的数据 | |
_recoverFromDosFormatTime ( $time, $date ) : integer | 还原DOS格式的时间为时间戳 | |
_unCompressData ( $data, $compressMethod ) : string | 解压被压缩的数据 | |
addFile ( $data, $filename, $timestamp ) : boolean | 增加待压缩的文件 | |
extract ( $file ) : array | 解压缩一个文件 | |
getCompressedFile ( ) : string | 返回压缩后的数据 | |
init ( ) | 初始化 |
public _checkLocalFileHeaderAndCentralDir ( unknown_type $localFileHeaderData, unknown_type $centralDirectoryData ) : boolean | ||
$localFileHeaderData | unknown_type | |
$centralDirectoryData | unknown_type | |
리턴 | boolean |
public _findEOFCentralDirectoryRecord ( $filesize ) : string | ||
$filesize | int 文件大小 | |
리턴 | string |
public _getCentralDirectory ( $modTime, $modDate, $crc, $compressedSize, $unCompressedSize, $filenameLength, $fileHeaderLength, $filename ) : string | ||
$modTime | ||
$modDate | ||
$crc | ||
$compressedSize | ||
$unCompressedSize | ||
$filenameLength | ||
$fileHeaderLength | ||
$filename | ||
리턴 | string |
public _getDataDescriptor ( $crc, $compressedSize, $unCompressedSize ) : string | ||
$crc | ||
$compressedSize | ||
$unCompressedSize | ||
리턴 | string |
public _getDosFormatTime ( $timestamp ) : array | ||
$timestamp | ||
리턴 | array |
public _readCentralDirectoryData ( ) : string | ||
리턴 | string |
public _readLocalFileHeaderAndData ( $centralDirectoryData ) : array | ||
$centralDirectoryData | array 'Central directory' 区块数据 | |
리턴 | array |
public _recoverFromDosFormatTime ( $time, $date ) : integer | ||
$time | ||
$date | ||
리턴 | integer |
public _unCompressData ( $data, $compressMethod ) : string | ||
$data | string 被压缩的数据 | |
$compressMethod | int 压缩的方式 | |
리턴 | string | 解压后的数据 |