GZIP is a zipping technique that runs on your server and compresses all data as it it sent out via HTTP. This technique is usually called "output compression". When compressed data arrives at the client (browser), it is unzipped.
Most modern browsers will unzip, but not all web clients will and output compression is not supported within many web services. The server will only compress its output if the request indicates that compression is acceptable. This is indicated in the request headers: When a browser is capable of unzipping, it indicates so in the GET Header,
GZIPping your outbound responses can reduce bandwidth by 50% or more. If you're just beginning your optimization efforts, implementing output compression is probably the first thing you should do.
Images are already compressed. You don't need to compress them even more. GZIP will be most effective when applied to ascii data, such as HTML, Javascript, CSS, and XML.
Besides GZIP, another popular compression format is DEFLATE. DEFLATE is not quite as powerful as GZIP, but it has been reported to be faster and is certainly easier to set up.
In Apache, enabling output compression with DEFLATE is fairly simple. Add the following to your .htaccess file:
<Location />
<IfModule mod_deflate.c>
# compress content with type html, text, and css
AddOutputFilterByType DEFLATE text/html text/plain text/css
<IfModule mod_headers.c>
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>
</Location>