The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.
zip_entry_compressionmethod(zip_entry)
Parameter | Is Required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
The compression method.
Returns the compression method of a zip archive entry
<?php//ww w.j a 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) . "\n";
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry);
}
zip_close($zip);
}
?>