View Single Post
  #11  
Old 04-12-2020, 20:22
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 953 Times in 309 Posts
78372 is on a distinguished road
Quote:
Originally Posted by elit View Post

-zlib codec did not inflated zip file at all!(I thought it was supposed to handle deflate?)
Yes, zlib is supposed to handle deflate but here's the catch, most of the standard zip files does not use regular deflate levels. In order to precompress, the zlib codec tries standard deflate compression levels (9levels * 9 memlevels = 81 tries) and not the tuned deflate options. On the other hand, preflate and reflate does not go with the hit&trial method, it has it's own algo for processing deflate streams. Games in general does not use deflate tuning which is why the zlib codec works good for games, but in other cases like zip, preflate/reflate works better.

Using zlib on where it does not need preflate/reflate is better though, as zlib codec does not produce additional hif files which makes compression a bit worse. When you are not sure, zlib+reflate is good to go as zlib will precompress what it can and pass whatever it can't to reflate which will maximize precompression. Except a few complex deflate streams, zlib+preflate is also a good option as hif files produced by preflate are significantly smaller than the files produced by reflate.
__________________
NOT AVAILABLE

Last edited by 78372; 04-12-2020 at 20:27.
Reply With Quote
The Following User Says Thank You to 78372 For This Useful Post:
elit (05-12-2020)