ID:          16689
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:      Open
+Status:      Closed
 Bug Type:    Bzip2 Related
 PHP Version: 4.1.2
 New Comment:

Try a recent CVS snapshot; you can now use feof on bz handles.
Reopen this report if it doesn't work for you :-)


Previous Comments:
------------------------------------------------------------------------

[2002-04-18 17:29:05] [EMAIL PROTECTED]

obviously feof will not work on a Bz file handle (though it would be
nice if it did)

the only way i could find it detect the end in a loop (where you would
be slurping in the whole file) is:

// open the file ... $bzfile

$data="";
$string=bzread($bzfile,4096);
while ($string!=str_repeat("\0",4096)) {
   $data.=$string;
   $string=bzread($bzfile,4096);
}

a better mechanism for eof detection is needed

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16689&edit=1

Reply via email to