PHP zip_entry_compressionmethod() Function
In this chapter you will learn:
- 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
Description
The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.
Syntax
zip_entry_compressionmethod(zip_entry)
Parameter
Parameter | Is Required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
Return
The compression method.
Example
Returns the compression method of a zip archive entry
<?php//from j av a 2s. c om
$zip = zip_open("test.zip");
if ($zip){
while ($zip_entry = zip_read($zip)){
echo "Name: " . zip_entry_name($zip_entry) . "\n";
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry);
}
zip_close($zip);
}
?>
Next chapter...
What you will learn in the next chapter:
- Description for PHP zip_entry_filesize() Function
- Syntax for PHP zip_entry_filesize() Function
- Parameter for PHP zip_entry_filesize() Function
- Return for PHP zip_entry_filesize() Function
- Example - returns the original file size before compression of a zip archive entry
Home » PHP Tutorial » PHP Zip Functions