PHP zip_entry_compressionmethod() — legacy ZIP API

zip_entry_compressionmethod() identifies the compression method used for an entry. PHP deprecated this procedural function in 8.0. For new code, use ZipArchive::statIndex().

A simple example

zip_entry_compressionmethod()

  1. Start with A member added with no compression
  2. Do this Read the method
  3. Result Stored
Stored means the archive member was recorded without applying a compression algorithm.

Use ZipArchive to read entries by name in modern PHP.

To run the examples, save bbminfo.zip and bbminfo-nested-folder.zip beside your script and run it from that directory.