help with stream filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

 

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux