Apache uses deflate which is responsible for compressing the data into gzip formatting and sending it to the client, its important to note that the compress happens as the data is requested and not before. You should familiarize yourself with mod_deflate as well ensure its installed and enabled correctly.
Formats such as MP3 are not ideal for gzip since they are already compressed and this would add additional resources to a pointless task, text based files are not compressed and very ideal for this gzip. You can specify formats by using the following code:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
Notice how all the above are all TEXT based - as mentioned before do not attempt to compress heavy files as this is likely to delay your server and make it slower.
You should check this guide out about optimizing your site with Gzip.
Compressing Data Before Sending It
Some data can be compressed before you send it - mp3's and videos are already compressed in mp3 formating, and mp4 or any other video format. The text files such as HTML, CSS can only be compressed using gzip as I know but you can minify it and make the files even smaller. If you have a VPS then you can install Google Modspeed which is an Apache module that gzips, minifiys and even combines js, css files.
Additional You May Find These Links Useful
Smushit is a Yahoo project and makes it easy to compress your PNG/Jpeg/Gif files even smaller without losing any quality over your original compression settings. It uses a lossless compression.