As I recall, there's two basic ways to set up mod_deflate:
Compress all by default, then define exceptions
Don't compress all by default, and define what to compress (with exceptions)
There's lots of things you don't want to compress:
Anything above a certain size, possibly (but I don't think this is an option in the config)
Every type of video file, possibly? (e.g. add .mkv in particular, plus possibly .ts, .mpg, .mpeg although some of those might benefit. But do we want to? They are likely to be big, and reducing a 10Mb file to 9Mb isn't worth my CPU cycles, I don't think.
What about Flash - .swf? .flv?
Audio files? .ogg, for example is nicely compressed to start with. But again some of those are compressible but may be big and not worth the bother.
Anyway here's an alternative mod_deflate.conf, which appears to be from the "deflate all, except as defined" school, and comes from the Apache website ( http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
) with a modification to comment out the cludge for 2.0.48 on the assumption that people will be using a later version)
# Insert filter
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0 no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
# BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary