• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Import file size compression ratio

Status
Not open for further replies.
Level 15
Joined
Mar 8, 2009
Messages
1,651
Didn't find it in tutorials, so i'm asking here:

How do I calculate the increase in size when importing a model? As I understand, a model (or any other resource) is compressed when imported, so I gotta know the percentage.

Thanks in advance
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Varies on the layout of the model data. Compression does not give an absolute file size reduction due to how it works. If the model has very unique data layout (worst case for the compression algorthim) then the compression will be near 0% and this can happen in the case of something already compressed with a simlar algorthim (.jpeg for example). If the model has the same data repeated a lot or is best case layout for the compression algorthim then it could reach near 99% (eg if the model was padded to 4MB with 0 bytes at the end).
 
Level 15
Joined
Mar 8, 2009
Messages
1,651
ah, so if a model is like 200kb itself, but zipped it is 50kb, so I should treat it as 50kb increase?
 
Status
Not open for further replies.
Top