ID: 29532 Updated by: [EMAIL PROTECTED] Reported By: bitlz at nezabudka dot ru -Status: Open +Status: Bogus Bug Type: Bzip2 Related Operating System: windows 2000 server sp 4 PHP Version: 5.0.0 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. http://no2.php.net/bzread Previous Comments: ------------------------------------------------------------------------ [2004-08-05 12:37:56] bitlz at nezabudka dot ru Description: ------------ in documentation: string bzread ( resource bz [, int length]) really: if used length more than 8192, bzread reads incorrect quantity of byte ( 8192 ). version php: PHP 5.0.0 (cli) (built: Jul 13 2004 21:39:58) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.0, Copyright (c) 1998-2004 Zend Technologies Reproduce code: --------------- qqq.php: $fpbz = bzopen("1.txt.bz2", "wb"); $fp = fopen("1.txt", "rb"); $a = filesize("1.txt"); echo $a."\n"; $buf = fread($fp,filesize("1.txt")); $buf = bzwrite($fpbz, $buf); bzclose($fpbz); fclose($fp); $fp = fopen("2.txt", "wb"); $fpbz = bzopen("1.txt.bz2", "rb"); $buf = bzread($fpbz, $a); fwrite($fp,$buf, $a); bzclose($fpbz); fclose($fp); $a = filesize("2.txt"); echo $a."\n"; Expected result: ---------------- expected result: D:[EMAIL PROTECTED]>php qqq.php 60201 60201 D:[EMAIL PROTECTED]> Actual result: -------------- actual result: D:[EMAIL PROTECTED]>php qqq.php 60201 8192 D:[EMAIL PROTECTED]> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29532&edit=1
