Lines Matching refs:zip
5 if (!extension_loaded('zip')) die('skip');
9 $tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip';
16 $zip = new ZipArchive;
17 if ($zip->open($tmpfile, ZipArchive::CREATE) !== TRUE) {
21 $zip->addFromString('entry1.txt', $txt);
22 $zip->addFromString('entry2.txt', $txt);
23 $zip->addFromString('dir/entry3.txt', $txt);
24 $zip->addFromString('entry4.txt', $txt);
25 $zip->addFromString('entry5.txt', $txt);
26 $zip->addFromString('entry6.txt', $txt);
27 $zip->addFromString('entry7.txt', $txt);
29 var_dump($zip->setCompressionName('entry2.txt', ZipArchive::CM_DEFAULT));
30 var_dump($zip->setCompressionName('dir/entry3.txt', ZipArchive::CM_STORE));
31 var_dump($zip->setCompressionName('entry4.txt', ZipArchive::CM_DEFLATE));
33 var_dump($zip->setCompressionIndex(4, ZipArchive::CM_STORE));
34 var_dump($zip->setCompressionIndex(5, ZipArchive::CM_DEFLATE));
35 var_dump($zip->setCompressionIndex(6, ZipArchive::CM_DEFAULT));
37 if (!$zip->close()) {
43 $zip = zip_open($tmpfile);
44 if (!is_resource($zip)) {
48 while ($e = zip_read($zip)) {
51 zip_close($zip);
55 $tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip';