English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

zip_entry_compressed_size() Function in PHP

The zip_entry_compressed_size() function returns the compressed file size of the zip archive entry.

Syntax

zip_entry_compressed_size(zip_entry)

Parameter

  • zip_entry-Postal code entry resource. Required.

Return

The zip_entry_compressed_size() function returns the compressed file size of the zip archive entry.

The following is an example of getting the file size of the archive "new.zip".

Example

<?php
   $zip = zip_open("new.zip");
   if ($zip) {
      while ($zip_entry = zip_read($zip)) {
         echo "Compressed = ". zip_entry_compressedsize($zip_entry). "<br" />";
      }
      zip_close($zip);
   }
?>

Output Result

Compressed: 90
Compressed: 12
Compressed: 67