|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-05 11:27 UTC] msquillace at sogei dot it
[2006-07-05 20:12 UTC] mg at iceni dot pl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 22:00:01 2025 UTC |
Description: ------------ I am using LZF-1.3 Php modules: gd, ldap, lzf, mmcache, mysql, mysqli, odbc, pgsql, rar, xdebug The only change I made to php.ini is that I increased the memory size to 32 M Reproduce code: --------------- <?php $UCdata=''; // create an uncompressed string for($i=0;$i<10000;$i++) $UCdata.=chr(ord('a')+rand(0,26)); //fill with letters $Cdata=lzf_compress($UCdata); // compress the string $UCsize=strlen($UCdata); // memorize uncompressed size $Csize=strlen($Cdata); // memorize compressed size $DCdata=lzf_decompress($Cdata); // decompress the string $DCsize=strlen($DCdata); // memorize the decompressed size // print the memorized sizes echo 'UC: '.$UCsize.', C: '.$Csize.', DC: '.$DCsize; // On almost every run of this script I get // different(truncated) output from lzf_decompress()! ?> Expected result: ---------------- It should be something like... (C varies) UC: 10000, C: 9736, DC: 10000 Actual result: -------------- It output's something like... UC: 10000, C: 9736, DC: 1024 The DC should be equal with UC!