Re: transparent output compression patch
| From: | Zeev Suraski | Date: | Sun, 12 Nov 2000 22:40:05 +0000 |
| Subject: | Re: transparent output compression patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37858@lists.php.net to get a copy of this message | ||
Thanks for the patch. I'll try to take a look at it this week.
At 23:54 12/11/2000, Jade Nicoletti wrote:
Hi Here's a patch that adds transparent output compression in the output layer. The patch is just a start. I've mainly posted it to get some feedback... So far, it isn't thread safe and only the 'gzip' coding really works. Some questions that I have:Probably not. The output buffering mechanism supports output handlers, even user-defined output handlers.- Is output.c the right place to put this stuff in?
- There shouln't be a ob_compress_finish(). The gzip/deflate trailer
should be sent automatically. Where should I place the call to
that function?
If you implement the gzip encoding as an output handler, this will be taken care of transparently for you.
- The patch won't work if you dynamically load the zlib extension.
How can I fix that?
HAVE_ZLIB isn't set... should I remove the '#if's and check
at runtime if zlib is available? I think this won't work if the
compression is done in output.c...
If (when :) you implement the gzip encoding as an output handler, I'd say this code belongs to the gzip module. Then, whenever gzip support is available, gzip encoding would also be available, regardless of whether the gzip module is static or dynamic.
Thanks again for the patch!
Zeev
--
Zeev Suraski <zeev@zend.com>
CTO, Zend Technologies Ltd. http://www.zend.com/