Is it possible that the zip swf file will result in a larger file?

When I am a GZIP swf file, the size is from 1.21 mb to 1.86 mb ... So, my question was answered a little by myself. The question is, how is this possible? I think, as my colleague said, swf is already binary and can no longer be compressed.

The findings also are that zip swf files should not be executed.

+3
source share
3 answers

SWF is already encoded, and this encoding includes compression. It is possible that if you are going to compress an already compressed file, compression will result in a larger file. For example, when trying to create a ZIP JPEG or PNG file .

, , . , . , BMP .

+5

SWF . FWS, , CWS, zLib gZip ( zLib ). , 50% ...

, SWF , . SWF .

, Precomp , , gZip ( 7-Zip), SWF , Precomp , 7-Zip PCF.

JPG SWF . , ZIP, JPG, PNG, GIF.

+5

entropy, "" message ( SWF ). , , .

1,21 10 150 215 . 10 150 215 , . , , 9 000 000 . , 9 000 000 .

, . "", . , , , - , .

If your file is already compressed, then its size is already close to the entropy of the source data. When you try to compress it again (and especially in your case when you use the same algorithm), there will not be much reduction in size, and you will add another layer of additional data depending on the algorithm. If the additional data is larger than the additional reduction in size, your double-compressed file will be larger than the compressed only once.

+1
source

Source: https://habr.com/ru/post/1766626/


All Articles