$size
$size : int
Zip reader.
$size : int
$inStream : resource
$options : array
copyUncompressedDataToStream(\PhpZip\Model\Data\ZipSourceFileData $zipFileData, resource $outStream) : mixed
\PhpZip\Model\Data\ZipSourceFileData | $zipFileData | |
resource | $outStream |
readEndOfCentralDirectory() : \PhpZip\Model\EndOfCentralDirectory
Read End of central directory record.
end of central dir signature 4 bytes (0x06054b50) number of this disk 2 bytes number of the disk with the start of the central directory 2 bytes total number of entries in the central directory on this disk 2 bytes total number of entries in the central directory 2 bytes size of the central directory 4 bytes offset of start of central directory with respect to the starting disk number 4 bytes .ZIP file comment length 2 bytes .ZIP file comment (variable size)
findZip64ECDPosition() : int
Read Zip64 end of central directory locator and returns Zip64 end of central directory position.
number of the disk with the start of the zip64 end of central directory 4 bytes relative offset of the zip64 end of central directory record 8 bytes total number of disks 4 bytes
Zip64 End Of Central Directory position
readZip64EndOfCentralDirectory(int $zip64ECDPosition) : \PhpZip\Model\EndOfCentralDirectory
Read zip64 end of central directory locator and zip64 end of central directory record.
zip64 end of central dir signature 4 bytes (0x06064b50) size of zip64 end of central directory record 8 bytes version made by 2 bytes version needed to extract 2 bytes number of this disk 4 bytes number of the disk with the start of the central directory 4 bytes total number of entries in the central directory on this disk 8 bytes total number of entries in the central directory 8 bytes size of the central directory 8 bytes offset of start of central directory with respect to the starting disk number 8 bytes zip64 extensible data sector (variable size)
int | $zip64ECDPosition |
readCentralDirectory(\PhpZip\Model\EndOfCentralDirectory $endCD) : \PhpZip\Model\ZipEntry[]
Reads the central directory from the given seekable byte channel and populates the internal tables with ZipEntry instances.
The ZipEntry's will know all data that can be obtained from the central directory alone, but not the data that requires the local file header or additional data to be read.
\PhpZip\Model\EndOfCentralDirectory | $endCD |
readZipEntry(resource $stream) : \PhpZip\Model\ZipEntry
Read central directory entry.
central file header signature 4 bytes (0x02014b50) version made by 2 bytes version needed to extract 2 bytes general purpose bit flag 2 bytes compression method 2 bytes last mod file time 2 bytes last mod file date 2 bytes crc-32 4 bytes compressed size 4 bytes uncompressed size 4 bytes file name length 2 bytes extra field length 2 bytes file comment length 2 bytes disk number start 2 bytes internal file attributes 2 bytes external file attributes 4 bytes relative offset of local header 4 bytes
file name (variable size) extra field (variable size) file comment (variable size)
resource | $stream |
loadLocalExtraFields(\PhpZip\Model\ZipEntry $entry) : mixed
Read Local File Header.
local file header signature 4 bytes (0x04034b50) version needed to extract 2 bytes general purpose bit flag 2 bytes compression method 2 bytes last mod file time 2 bytes last mod file date 2 bytes crc-32 4 bytes compressed size 4 bytes uncompressed size 4 bytes file name length 2 bytes extra field length 2 bytes file name (variable size) extra field (variable size)
\PhpZip\Model\ZipEntry | $entry |