in reply to Gzip inflate a variable

Just a note of caution in amongst the other responses: Trying to compress an image that's stored in most of the common web-image formats rarely does anything useful. They all have specialized compression built in to the format, that will do better for images than gzip will.

If it does make any (positive) difference, it's probably a good idea to look at how you are storing/generating these images. There's probably an option or so that you can use to increase the compression in the file itself, which would do more than gzip would.

Replies are listed 'Best First'.
Re^2: Gzip inflate a variable
by pmqs (Friar) on Jan 26, 2010 at 08:21 UTC
    That's a very valid point - if you attempt to compress an image type that already uses compression under-the-hood (e.g. gif, jpeg), the output that is larger than the input.