poor compression (gzip - png)

Discussion in 'Install/Configuration' started by Jan Guti, Jul 21, 2009.

  1. Jan Guti

    Jan Guti New Member

    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
  2. mistwang

    mistwang LiteSpeed Staff

    You can try increase the compression level, litespeed uses "1" as the default, you can try "9".
  3. Jan Guti

    Jan Guti New Member

    I have tried from 1 to 9 and there is no change in the results.

    JG
  4. mistwang

    mistwang LiteSpeed Staff

  5. Jan Guti

    Jan Guti New Member

    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.
  6. mistwang

    mistwang LiteSpeed Staff

    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.
  7. Jan Guti

    Jan Guti New Member

    Yes, there is something wrong, same image:

    image in litespeed server: (compression level 6)
    Code:
    http://publikando.com/test1.png

    same image in nginx server: (compression level 4)
    Code:
    http://publikacion.de/test1.png
    JG
  8. mistwang

    mistwang LiteSpeed Staff

    gzip compression has no effect from both result, as expected.
    Checked with YSlow.
  9. Jan Guti

    Jan Guti New Member

    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
  10. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page