Question

I have a file of 100 MB and it was compressed by huffman coding 20 times.

I want to draw a diagram for the changes of the size of the file while compressing it, so the x axis will have the number of compression times, and the y axis is the size of the file?

how it will be ?

Was it helpful?

Solution

Your question seems unclear. Do you mean what would it roughly look like? Repeated compression on files has very steep diminishing returns. That is to say, the first compression will shrink it significantly, the second a little to none at all, and the subsequent tries will really not compress it at all, or possibly even get bigger. Compression is predicated on a lack of randomness, patterns, and being able to make those patterns represented with fewer bytes. After compression, files look more like random noise, so they are more difficult to compress.

Read through some of this for more information: http://mattmahoney.net/dc/dce.html#Section_11

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top