RFC 2616 suggests that a more correct way to compress documents on the fly is to use gzip transfer encoding rather than gzip content encoding. However, it's perhaps not advisable to use this since client support for it is extremely limited.
The difference is most evident when you come to save a file from your browser. If it's gzip content encoded then the browser should (and may well) save it gzipped. If it's gzip transfer encoded then the browser should uncompress it first.