Menu

What is "Compression ratio"?

Help
1400700226
2015-10-01
2025-10-28
  • 1400700226

    1400700226 - 2015-10-01

    I am very confusing with the compression ratio, we always say it is high or low, but how to calculate it? The formula of it is what?
    Thanks a lot!

     

    Last edit: 1400700226 2015-10-01
  • Shell

    Shell - 2015-10-01

    Compression ratio is the ratio of sizes before and after compression. Archivers (including 7-Zip) usually divide compressed size by uncompressed size, so the compression ratio varies from 0 to about 1.1 (compressed size may be somewhat bigger) or, equivalently, from 0% to 100% (values above 100% are traditionally clamped down). This way, the smaller is the ratio, the better is compression.

    Alternatively, one may divide uncompressed size by compressed size - this way we say how tightly the file is compressed. We may speak, e.g., about 2:1 ratio - that is, the original files occupy twice as much space as the compressed ones.

     
    • Mr Push

      Mr Push - 2015-12-09

      Hi, I am failing to understand why you give a compression ratio as a percentage. As you can see from above, this simply causes confusion to the users of your software because it is not standard practice. I know how you come up with your percentage; however you are using incorrect terminology. Compression ratio is never given as a percentage; SPACE SAVING is given as a percentage.

      Compression ratio as:

      Compression Ratio = (Uncompressed Size)/ (Compressed Size) (i.e. 5.25:1)

      SAPCE SAVINGS = 1-(Compressed Size/Uncompressed Size) (*100 if you want to see %)

      This gives the user a SPACE SAVING percentage, which most understand over what your software shows during a compression. What you are doing is showing the ratio of space STILL BEING USED as a percentage of original by the files after compression, not the percentage that is being SAVED. I believe most people could care less about the ratio still being used; they want to know how much free space they are gaining. Personally, I want to know what % of space I am GAINING because most of the time people are compressing due to LOW DISK SPACE. I simply will look at post file size and quantify what the files still take up on my drives.

      The method you use does the opposite of what one might expect. If the file(s) have a high ability to be compressed, 7Z shows a LOW "compression ratio percentage", like 11%. There is no logic in this; a HIGHER COMPRESIION RATIO means BETTER COMPRESSION, or a HIGHER PERCENTAGE of saved space. You are displaying a LOWER COMPRESSION RATION PERCENTAGE and people are supposed to know that this translates into a HIGHER COMPRESSION RATIO?. Its not logical. What you are using is an inverse relationship and is not based on compression ratio terminology. You need to at least add the "1-" to give the user something they can understand as "space savings".

      Heck why not go even further and show exaclty HOW MUCH SPACE has been gained with the compression, which is what most people want to know!

      "Original Size = 1GB, Compresesed Size = .25GB, SPACE GAINED = .75GB"

      That is what I want to see, what I'm getting back.

      May I suggest that to make this easier to understand for the average person that you use this:

      1-(compressed size/Uncompressed size)*100 = PERCENT SPACE SAVINGS

      Users simply look at post files size to quantify what the files take up after the compression is finished. The range of 0 to 1.1 carries no quantifiable logical for end users and it adds confusion.

      MP

       
      • fernando

        fernando - 2015-12-09

        WinRAR display of compression ratio

         
  • 1400700226

    1400700226 - 2015-10-02

    Thank you!

     
  • Harris Marfel

    Harris Marfel - 2017-01-30

    so that mean, more smaller % ratio is more smaller size?

     
  • VictorVG

    VictorVG - 2017-01-31

    It all depends on the context, but in general, your ratio is the ratio of "input size / output size" and to archive the bigger it is, the smaller the size of the output stream. We can write it as a percentage of the ratio of "the size of the output / input size" and then the lower the percentage the better, or the number of "input size / output size" here than it is, the better. That's why you need to look and what people have in mind?

     
  • David Bencic

    David Bencic - 2017-02-16

    I also find it confusing that your compression ratio seems to be backwards. Please refer to this LINK.

    Please either show it as a true Ratio of x/1 (i.e. 10/1) or if you want to do Percentage (user preferred) then please use the formula of % = (1-(compressed / uncompressed)) x 100

    It seems that you are not doing the 1- aspect of the formula, which makes your result show the opposite of what everyone else is doing. A lower number should represent a higher level of compression (Space Savings).

    Thank you,
    David

     
  • Igor Pavlov

    Igor Pavlov - 2017-02-17

    I suppose it's not good idea to change that thing.
    Users can expect things as they were in previous versions.
    Note also that "1- " is additional action.
    So it can be more complcated thing for understanding.
    And negative percents are possible in that case, that also can add some level of complexity.

     

Log in to post a comment.