The zip_entry_compressedsize() function returns the compressed file size of a zip archive entry.
PHP zip_entry_compressedsize() Function has the following syntax.
zip_entry_compressedsize(zip_entry)
Parameter | Is required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
The compressed size.
Returns the compressed file size of a zip archive entry
<?php/* w w w. j a v a 2 s. com*/
$zip = zip_open("test.zip");
if ($zip){
while ($zip_entry = zip_read($zip)){
echo "Name: " . zip_entry_name($zip_entry);
echo "Compressed Size: " . zip_entry_compressedsize($zip_entry);
}
zip_close($zip);
}
?>