PHP zip_entry_compressedsize() Function
In this chapter you will learn:
- Description for PHP zip_entry_compressedsize() Function
- Syntax for PHP zip_entry_compressedsize() Function
- Parameter for PHP zip_entry_compressedsize() Function
- Return for PHP zip_entry_compressedsize() Function
- Example - returns the compressed file size of a zip archive entry
Description
The zip_entry_compressedsize() function returns the compressed file size of a zip archive entry.
Syntax
PHP zip_entry_compressedsize() Function has the following syntax.
zip_entry_compressedsize(zip_entry)
Parameter
Parameter | Is required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
Return
The compressed size.
Example
Returns the compressed file size of a zip archive entry
<?php// ja v a2 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 "Compressed Size: " . zip_entry_compressedsize($zip_entry);
}
zip_close($zip);
}
?>
Next chapter...
What you will learn in the next chapter:
- Description for PHP zip_entry_compressionmethod() Function
- Syntax for PHP zip_entry_compressionmethod() Function
- Parameter for PHP zip_entry_compressionmethod() Function
- Return for PHP zip_entry_compressionmethod() Function
- Example - returns the compression method of a zip archive entry
Home » PHP Tutorial » PHP Zip Functions