Hi, everyone

 

         Has anyone tried to use stream filter to decompress a large file?
My problem when doing this is memory consume.

My php process requires more and more memory as time goes. Is this a bug or
just I don’t get the right usage?

 

         My code as follows:

          26 $fp = fopen ( $filename, 'r' );

     27 $filter = stream_filter_append($fp, 'bzip2.decompress',
STREAM_FILTER_READ);

     28 

     29 $counter = 0; 

     30 while ( ! feof ( $fp ) )

     31 {

     32     $counter ++;

     33     $line = fgets ( $fp ); 

 

         Thanks!

 

 

Reply via email to