6 skipif(!function_exists('http_gzencode'), 'need zlib');
13 error_reporting(E_ALL);
18 for ($i = 0; $i < 1000000; $i++) {
19 $s .= chr(rand(0,255));
22 var_dump($s == http_gzdecode(http_gzencode($s)));
23 var_dump($s == http_inflate(http_deflate($s)));
24 var_dump($s == http_inflate(http_deflate($s, -1, true)));
26 if (extension_loaded('zlib')) {
28 $s = "A simple test string, which won't blow up ext/zlib.\n";
30 ($s == http_gzdecode(gzencode($s))) or print "GZIP Failed\n";
31 ($s == http_inflate(gzdeflate($s))) or print "DEFLATE Failed\n";
32 ($s == http_inflate(gzcompress($s))) or print "COMPRESS Failed\n";
34 ($s == gzinflate(http_deflate($s))) or print "INFLATE Failed\n";
35 ($s == gzuncompress(http_deflate($s, -1, true))) or print "UNCOMPRESS Failed\n";