Friday, October 21, 2011

JavaScript Compression libraries (compression ratio tests)

This post contain information how each library compressing the data. All libraries was trying to compress 5  html pages with different size. You will see how good they are.



For more details about testing conditions - see previous post.

Compression ratio results:
Next graph represent compression ratio of all libraries in default mode for (deflate and LZMA algorithms):

As you can see best results provided by LZMA library and Deflate algorithms. However LZW is also not so bad if we take into account that it's code is 75 lines and almost 2Kb in non minified form.

In next graph you can see difference of compression ratio for different settings in deflate and LZMA algorithms (For this test I used only dankogai-js-deflate because  Stuck-jszip and onicios-deflate provide the same values):

There is constant decreasing of size when we increasing compression level. However bigger compression level seriously impact performance.

In the next post I am going to demonstrate how fast each library is.

Previous Post: Libraries and Test conditions
Starting Post: Libraries and Test conditions
Next Post: Compression performance test

2 comments:

  1. Hi there, i'm very interested in your benchmarks, could you give me permission to see the results?
    thanks

    ReplyDelete
    Replies
    1. Hi,

      sorry for late reply. Updated permission and now graphs should be visible.

      Please let me know if there any problems left

      Delete