Compression tests
Posted: Sat Jul 26, 2008 12:46 pm
I tried to compress HPI archives in various formats, here is what I got:
7z -> bigger
bz2 -> bigger
gz -> bigger
zip -> bigger
and size increases more with "efficient" algorithms like 7z or bz2 ...
This was expected since HPI files are already compressed using LZ77 or zlib ... and even if HPI can be uncompressed, very few don't use compression. Most of HPI archives use zlib compression.
The conclusion is:
if we want to make an online mod service we can just put a mod in a single HPI archive, it'll already be "small" (compared to uncompressed archive) and can be put directly into its own directory.
We can also put a small file in the mod folder that contains useful information about the mod version, MD5SUM, etc... so we can easily check if the mod is up to date and/or corrupt
7z -> bigger
bz2 -> bigger
gz -> bigger
zip -> bigger
and size increases more with "efficient" algorithms like 7z or bz2 ...
This was expected since HPI files are already compressed using LZ77 or zlib ... and even if HPI can be uncompressed, very few don't use compression. Most of HPI archives use zlib compression.
The conclusion is:
if we want to make an online mod service we can just put a mod in a single HPI archive, it'll already be "small" (compared to uncompressed archive) and can be put directly into its own directory.
We can also put a small file in the mod folder that contains useful information about the mod version, MD5SUM, etc... so we can easily check if the mod is up to date and/or corrupt