View Full Version : poor compression (gzip - png)
Jan Guti
07-20-2009, 08:13 PM
Hello.. i noted that with litespeed the png images do not get compressed, im using another server with nginx and the compress ratio is more than 60%, nginx uses gzip too. Is this normal with litespeed? Is not gzip the same in whatever server is running?
The compression is important for me because the server is serving png images, the compression of html, css is woorking great.
And i have added in server > tuning > Compressible Types > image/png
running litespeed 4.0.6, testing with yslow
JG
mistwang
07-20-2009, 08:15 PM
You can try increase the compression level, litespeed uses "1" as the default, you can try "9".
Jan Guti
07-20-2009, 08:22 PM
I have tried from 1 to 9 and there is no change in the results.
JG
mistwang
07-20-2009, 08:27 PM
For static file, the compressed results are cached,
http://www.litespeedtech.com/docs/webserver/config/tuning/#gzipCacheDir
clear the cache directory, or touch the png file to trigger cache invalidation.
Jan Guti
07-20-2009, 10:09 PM
I deleted the cache and the compression stop working even for text, i uninstalled litespeed and reinstalled but compression for png is the same as uncompressed, text is working fine.
mistwang
07-20-2009, 11:39 PM
Have you checked the response header with firebug for "Content-encode: gzip"?
Is a png file compressed, just like a gif file? If it is compressed already, compress again wont make it any smaller.
Jan Guti
07-21-2009, 09:15 AM
Yes, there is something wrong, same image:
image in litespeed server: (compression level 6)
http://publikando.com/test1.png
same image in nginx server: (compression level 4)
http://publikacion.de/test1.png
JG
mistwang
07-21-2009, 09:30 AM
gzip compression has no effect from both result, as expected.
Checked with YSlow.
Jan Guti
07-21-2009, 08:45 PM
In my side.. 2 different computers (vista, w7 and ie8 ) with yslow:
In litespeed:
SIZE (KB): 37.8K GZIP (KB): 40.7K
Date Tue, 21 Jul 2009 15:45:12 GMT
Server LiteSpeed
Accept-Ranges bytes
Etag "9ee0-4a65d5eb-0"
Last-Modified Tue, 21 Jul 2009 14:51:23 GMT
Content-Type image/png
Content-Length 40705
Content-Encoding gzip
Vary Accept-Encoding
In nginx:
SIZE (KB): 37.8K GZIP (KB): 12.6K
Server nginx
Date Tue, 21 Jul 2009 14:50:05 GMT
Content-Type image/png
Last-Modified Tue, 21 Jul 2009 14:49:35 GMT
Vary Accept-Encoding
Expires Wed, 22 Jul 2009 14:50:05 GMT
Cache-Control max-age=86400
Content-Encoding gzip
So this mean the compression is side dependent, and my computer, browser, etc.. can affect this. Now i have to investigate how i obtaining a more of 60% compression in my side from nginx png.
JG
mistwang
07-22-2009, 01:16 PM
nginx uses chunked encoding, so the total length could be mis-calculated for some reason.
It is not difficult to get the real response body length with command line tools.
You can also try GZIP compress the png file from command line see what you can get.