Page 1 of 1

Compression tests

Posted: Sat Jul 26, 2008 12:46 pm
by zuzuf
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 :)

Posted: Sat Jul 26, 2008 12:55 pm
by Balthazar
Why not ;) Looks very logical.

Posted: Sat Jul 26, 2008 7:56 pm
by milipili
May be a tar archive to have a single bundle with various informations (name of the mode / authors / screenshots / icons / official web site / contact / Minimal TA3D Version / available translations/ misc, with our own extension to be linked with our application) ?

Posted: Sat Jul 26, 2008 9:46 pm
by zuzuf
Of course we'll need that kind of information but before downloading the mod ... that's why I don't like the idea of putting them within the archive, because you'll have to download the archive in order to know if you have to update it or not ... this doesn't sound very nice, does it ?

but we can provide those informations too within the ta3d.mod file which will be required by some mods and can be used for every mod in order to provide those informations. But again, we can put this into the HPI as well, it'll avoid the (small) overhead of another archive.

PS: nothing prevents us from giving a HPI archive a .t3d extension for example ... so we can link it with a mod installer :wink:

Posted: Sat Jul 26, 2008 10:17 pm
by milipili
you'll have to download the archive
Of course not. The information must be dupplicated in a cache by the server. The main reason is that the people in charge to update the mod has only to upload a single file, a single package, created by a program, with all usefull information. Like a DEB package for example. You have only one place for informations, considered as the reference.

so we can link it with a mod installer
It is the only purpose indeed :)

Posted: Sat Jul 26, 2008 10:40 pm
by zuzuf
since a HPI is already an archive there is no need to encapsulate it in a tar or something :)

Posted: Sat Jul 26, 2008 11:08 pm
by milipili
Oki ^^