Annotation of embedaddon/php/ext/zlib/tests/001.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: gzdeflate()/gzinflate()
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("zlib")) print "skip"; ?>
                      5: --FILE--
1.1.1.2 ! misho       6: <?php /* $Id$ */
1.1       misho       7: $original = str_repeat("hallo php",4096);
                      8: $packed=gzdeflate($original);
                      9: echo strlen($packed)." ".strlen($original)."\n";
                     10: $unpacked=gzinflate($packed);
                     11: if (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=gzdeflate($original, 9);
                     16: echo strlen($packed)." ".strlen($original)."\n";
                     17: $unpacked=gzinflate($packed, 40000);
                     18: if (strcmp($original,$unpacked)==0) echo "Strings are equal\n";
                     19: 
                     20: $original = 'aaaaaaaaaaaaaaa';
                     21: $packed=gzdeflate($original);
                     22: echo strlen($packed)." ".strlen($original)."\n";
                     23: $unpacked=gzinflate($packed);
                     24: if (strcmp($original,$unpacked)==0) echo "Strings are equal";
                     25: ?>
                     26: --EXPECT--
                     27: 100 36864
                     28: Strings are equal
                     29: 100 36864
                     30: Strings are equal
                     31: 5 15
1.1.1.2 ! misho      32: Strings are equal

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>