Compression tests

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Compression tests

Post by zuzuf » 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 :)
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sat Jul 26, 2008 12:55 pm

Why not ;) Looks very logical.

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Post by milipili » Sat Jul 26, 2008 7:56 pm

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) ?
Damien Gerard
Ta3d & Yuni Developer

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Jul 26, 2008 9:46 pm

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:
=>;-D Penguin Powered

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Post by milipili » Sat Jul 26, 2008 10:17 pm

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 :)
Damien Gerard
Ta3d & Yuni Developer

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Jul 26, 2008 10:40 pm

since a HPI is already an archive there is no need to encapsulate it in a tar or something :)
=>;-D Penguin Powered

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Post by milipili » Sat Jul 26, 2008 11:08 pm

Oki ^^
Damien Gerard
Ta3d & Yuni Developer

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests