help with stream filter
am 23.07.2009 04:20:48 von baihaoping------=_NextPart_000_02C5_01CA0B7F.419E3580
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Hi, everyone
=20
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?
=20
My code as follows:
26 $fp =3D fopen ( $filename, 'r' );
27 $filter =3D stream_filter_append($fp, 'bzip2.decompress',
STREAM_FILTER_READ);
28=20
29 $counter =3D 0;=20
30 while ( ! feof ( $fp ) )
31 {
32 $counter ++;
33 $line =3D fgets ( $fp );=20
=20
Thanks!
=20
=20
------=_NextPart_000_02C5_01CA0B7F.419E3580--