Make sure you check for bzerror while looping through a bzfile. bzread will not detect a compression error and can continue forever even at the cost of 100% cpu.$fh = bzopen('file.bz2','r');while(!feof($fh)) { $buffer = bzread($fh); if($buffer === FALSE) die('Read problem'); if(bzerror($fh) !== 0) die('Compression Problem');}bzclose($fh);