Mobile app version of vmapp.org
Login or Join
Hamaas447

: Optimal GZIP compression level for static resources? Is there a compression level which will provide an optimal balance between file size reduction and client decompression time/cost? I was wondering

@Hamaas447

Posted in: #Compression #Gzip #StaticContent

Is there a compression level which will provide an optimal balance between file size reduction and client decompression time/cost?

I was wondering which GZIP compression level provided the best balance between file size reduction and decompression time. Compression time doesn't really matter since it will only be compressed once and cached. However, I'm concerned that if I set the compression level too high, any gains from file size reduction will be wiped out by the time and cost required to decompress the file on the client side.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

1 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

It is unlikely that the compression level affects the decompression time. The tradeoff is in how much time/memory is spent in compression searching for the smallest way to express the input data — more compression isn't just extra layers of processing on both ends (that would be a good way to make the data larger).

Once the data is compressed, decompressing it is just following the instructions in the compressed file; there's no guesswork, and a better-compressed file might well be faster to decompress since less input data needs to be read.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme