 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
zip_entry_compressionmethod() function in PHP
The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.
Syntax
zip_entry_compressionmethod()
Parameters
- zip_entry − The zip entry resource. Required. 
Return
The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.
The following is an example. Let’s say we have 3 files in our zip archive "new.txt", therefore the compression method for all of these files will get displayed.
Example
<?php
   $zip = zip_open("new.zip");
   if ($zip) {
      while ($zip_entry = zip_read($zip)) {
         echo "Compression Method = ". zip_entry_compression_method($zip_entry). "<br />";
      }
      zip_close($zip);
   }
?>
Output
Compression Method = deflated Compression Method = deflated Compression Method = deflated
Advertisements
                    