The zip_entry_filesize() function returns the original file size before compression of a zip archive entry.
PHP zip_entry_filesize() Function has the following syntax.
zip_entry_filesize(zip_entry)
Parameter | Is Required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
The size of the directory entry.
Returns the original file size before compression of a zip archive entry
<?php/*w ww. j a va2 s . c o m*/
$zip = zip_open("test.zip");
if ($zip){
while ($zip_entry = zip_read($zip)){
echo "Name: " . zip_entry_name($zip_entry);
echo "Original size: " . zip_entry_filesize($zip_entry);
}
zip_close($zip);
}
?>