I finished implementing chunked output buffering, and made ob_gzhandler() 
compatible with it - so now chunked output compression is possible with 
PHP.  In my testing, supplying a 4KB buffer appears to be almost as 
efficient (compression-ratio wise) as compressing the entire buffer in one 
go.  Obviously, it's much more efficient memory-wise.

For instance, a phpinfo() script:
no compression                          40KB
ob_start("ob_gzhandler")                        5KB
ob_start("ob_gzhandler", 4096)          5.5KB
ob_start("ob_gzhandler", 64)            10KB

Read:  You can now efficiently have your outgoing PHP/HTTP traffic 
compressed with good compression ratios without sacrificing memory.

Comments extremely welcome - and if people can also test it and let me know 
whether it works for them, it'd be great.

Zeev

--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to