Unsupported zip compression

Hi,

I have a single text file of 3 GB and its compressed (zip) size is 99MB.

When I try to extract the zip file using below code… I have got the error status “Unsupported Compression / Compression method not supported”

$zip = new ZipArchive;
if ($zip->open($fileName) === TRUE) {
    $zip->extractTo($dir);
    $extractFile = trim($zip->getNameIndex(0), '/');
    echo $zip->getStatusString();
    $zip->close();
} else {
    echo 'Unable to get archive file from zip';
}

But the same file successfully extracted using “unzip” linux command.

Zip File description (zipinfo)
-rw-a-- 2.1 fat 3027500014 t- d64N 16-Sep-12 16:30 file.txt

Can anybody tell me what’s wrong with ZipArchive method

Do you know which compression method was used to create the zip file? Because as far as I know, you are able to unzip the file using linux’s command line because the zip package supports three compression methods: store, deflate and bzip2 (if compiled), and it’s very hard to find which methods are compiled with your libzip extension inside the zip archive documentation. Try using zip_read() and zip_entry_compressionmethod() to see if php is even recognizing the zip compression method properly.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.