Lines Matching refs:zip
6 if (!extension_loaded('zip')) die('skip');
10 $tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip';
17 $zip = new ZipArchive;
18 if ($zip->open($tmpfile, ZipArchive::CREATE) !== TRUE) {
22 $zip->addFromString('entry1.txt', $txt);
23 $zip->addFromString('entry2.txt', $txt);
24 $zip->addFromString('dir/entry3.txt', $txt);
25 $zip->addFromString('entry4.txt', $txt);
26 $zip->addFromString('entry5.txt', $txt);
27 $zip->addFromString('entry6.txt', $txt);
28 $zip->addFromString('entry7.txt', $txt);
30 var_dump($zip->setCompressionName('entry2.txt', ZipArchive::CM_DEFAULT));
31 var_dump($zip->setCompressionName('dir/entry3.txt', ZipArchive::CM_STORE));
32 var_dump($zip->setCompressionName('entry4.txt', ZipArchive::CM_DEFLATE));
34 var_dump($zip->setCompressionIndex(4, ZipArchive::CM_STORE));
35 var_dump($zip->setCompressionIndex(5, ZipArchive::CM_DEFLATE));
36 var_dump($zip->setCompressionIndex(6, ZipArchive::CM_DEFAULT));
38 if (!$zip->close()) {
44 $zip = zip_open($tmpfile);
45 if (!is_resource($zip)) {
49 while ($e = zip_read($zip)) {
52 zip_close($zip);
56 $tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip';