1--TEST-- 2gzcompress()/gzuncompress() 3--EXTENSIONS-- 4zlib 5--FILE-- 6<?php 7$original = str_repeat("hallo php",4096); 8$packed=gzcompress($original); 9echo strlen($packed)." ".strlen($original)."\n"; 10$unpacked=gzuncompress($packed); 11if (strcmp($original,$unpacked)==0) echo "Strings are equal\n"; 12 13/* with explicit compression level, length */ 14$original = str_repeat("hallo php",4096); 15$packed=gzcompress($original, 9); 16echo strlen($packed)." ".strlen($original)."\n"; 17$unpacked=gzuncompress($packed, 40000); 18if (strcmp($original,$unpacked)==0) echo "Strings are equal\n"; 19?> 20--EXPECT-- 21106 36864 22Strings are equal 23106 36864 24Strings are equal 25