Output compression
| From: | Christian Schneider | Date: | Sat, 13 Nov 1999 14:25:53 +0000 |
| Subject: | Output compression | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6177@lists.php.net to get a copy of this message | ||
A while ago I implemented Content-encoding: gzip compression for php (that was
back in 3.06 and 3.1 days) which never made it into the distribution. I was
thinking about reimplementing it for php4.
I looked into the SAPI/ext mechanism but it doesn't really fit in there as I
need to act as a filter between the core and the SAPI module, not replace the
SAPI module.
I can think of three approaches:
1) Don't touch core code and wedge into SAPI output functions at module
initialization (Problem: Get request-specific context to store compression
state.)
2) Hack it into the low-level output functions (that's what I did the first
time).
3) Extend SAPI or add a Filter mechanism where output filters can register to.
I looked into 1) because I wanted to avoid changing the core code but ran into
problems with where to store compression context. Solution 3) would be the
cleanest but I didn't work at the PHP4 code quite a while. Maybe someone else
has a better overview over the code and can tell me if it would be feasible/easy
to do.
And yes, I also want to make sure that my changes are welcome before I commit
them this time ;-)
- Chris
--
Chris Schneider, mailto:cschneid@relog.ch
Computers are not intelligent. They only think they are.