Here's what to keep in mind when you are designing your system. If your system is not expected to be heavily loaded, use simple solutions and default settings to save time. Enabling content compression can save you 30 to 50 percent off bandwidth costs; further fine-tuning may save another 1 percent. And it is a very time-consuming black art.
Remember that gunzip works much faster than gzip, so it is better to keep content compressed and decompress it on demand than compress it on the fly. Use server-side caching for compressed files where possible.
Here's a summary of web compression tips discussed in this chapter:
For lighter loads, use simple solutions and default settings.
Pre-compress content for maximum speed.
For dynamic content, use a module or ISAPI filter specifically designed for this, like mod_gzip, mod_deflate-ru, or mod_hs for Apache and PipeBoost, VIGOS, or Hyperspace i for IIS.
For Apache 2.0x, there's only one choice: mod_deflate.
In a shared hosting situation, try gzip_cnc.
For maximum speed or for other servers like Sun or iPlanet, consider a reverse proxy compression solution like AppCelera or VIGOS Website Accelerator.