Smaller ZIP/7z package (by from ~3.5% to ~28% for OpenTTD)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
CobraPL
Engineer
Engineer
Posts: 12
Joined: 13 Mar 2009 23:45

Smaller ZIP/7z package (by from ~3.5% to ~28% for OpenTTD)

Post by CobraPL »

Greetings,

how about making smaller ZIP/7z/7z-SFX package?

openttd-0.7.0-beta2-windows-win32.zip
  1. 3419306 bytes - original size
  2. 3306146 bytes - repacked using 7-zip - with: pass=10 fb=258
  3. 3299626 bytes - Optimized using ZIPMAX. - 96.50% of original size
  4. 3249106 bytes - optimized PNGs + ZIPMAX
  5. 2984825 bytes - optimized PNGs + main exe packed with UPX 3.03 with "--lzma --best" + ZIPMAX - 87.29% of original size
  6. 2490051 bytes - optimized PNGs + main exe packed with UPX 3.03 with "--lzma --best" + 7z format made with maximum compression, solid archiving, 64mb dictionary size and single thread.
  7. 2463158 bytes - optimized PNGs + 7z format made with maximum compression, solid archiving, 64mb dictionary size and single thread - 72.04% of original size; for 10000 downloads it saves ~8.9gb of traffic ;)
  8. 2603446 bytes - optimized PNGs + 7z format made with maximum compression, solid archiving, 64mb dictionary size and single thread - SFX archive, so you can unpack it on any computer w/o 7-zip. 76.14% of original size
Some notes: Peter
Last edited by CobraPL on 14 Mar 2009 22:37, edited 16 times in total.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by Conditional Zenith »

Better optimization would be achieved by using something other than zip.
CobraPL
Engineer
Engineer
Posts: 12
Joined: 13 Mar 2009 23:45

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by CobraPL »

Conditional Zenith wrote:Better optimization would be achieved by using something other than zip.
I agree, first post edited. But perhaps DEVs want to stay with zip because of compatibility. BTW. I saw some projects with both .zip and .7z releases.
MrFrans
Engineer
Engineer
Posts: 59
Joined: 10 Apr 2004 15:06
Location: The Netherlands
Contact:

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by MrFrans »

CobraPL wrote:I saw some projects with both .zip and .7z releases.
That is probably a good idea.
"A script is what you give the actors. A program is what you give the audience."
-Larry Wall
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by Rubidium »

Is that 'better' compression tool available on freshly installed computers? Guess not. Care to teach people how to install such a tool just to install OpenTTD? I don't think you're willing to do that and even if you would most people would be scared away because "it doesn't work".

Anyhow... by far most people download the installer which is significantly smaller than what you can reach by optimizing the zip. Furthermore the creation of the packages happens completely automatic on a Unix machine. After all... most "simple" users want the installer because extracting the zip and placing the TTD graphics in the right place is very hard for them.

We're also very hesistant to changes of the system we use to build OpenTTD as that requires much testing. Especially when you want us to install new and unknown applications. It's quite a fragile ecosystem and minor changes can have very unwanted effects such as loss of network connection (strangeness between the ISP's hardware and the software used to build our binaries) which is very inconvenient when you've got no (quick) terminal access.

So long story short: in my opinion the effort use another untested/unknown tools to create the packages outweighs the gains of it.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by FooBar »

CobraPL wrote:For 10000 downloads it saves ~92mb of traffic ;)
That's hardly worth the effort...
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by XeryusTC »

3% isn't that much of a saving on a package IMO, hardly worth the effort.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
Wold
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 03 Aug 2006 19:32
Skype: woldy_bg
Location: Bulgaria

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by Wold »

We can save a about 25% using kgb for the whole archive, but is it worth it?
I think the idea is to use what every windows has - WinZip. Quick and simple, isn't it?
Image
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by Conditional Zenith »

Yes, zip for all it's problems is the most widely supported general-purpose compression format, and can be handled by most operating systems out of the box.

And I agree, a 3% saving is barely worth the effort.

Having said that, I don't see why there can't be another format as well, and 7zip makes the most sense IMO. It compresses well, has an open source implementation on all 3 major platforms, and a linux commandline implementation. However it sounds like the OTTD server goes offline if you look at it funny (which I don't get, but the devs say it is so), and zip alone works well enough.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by Rubidium »

The server goes offline under certain loads. We cannot reproduce this on our home computers and do not want to unneededly compromise the stability of the server by experimenting in that (fragile) ecosystem which seems to be quite stable lately.
CobraPL
Engineer
Engineer
Posts: 12
Joined: 13 Mar 2009 23:45

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by CobraPL »

Guys, from the beginning I thought about optimizing only major builds, for example 7.0.0 final or betas/RC, not nightly ones. I didn't mind envolving/changing system - rather doing it by hand, once for major release. Anyway, devs are aware of such technique and will do what they want...
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: Smaller ZIP package (by ~3% for OpenTTD)

Post by TrueBrain »

CobraPL wrote:Guys, from the beginning I thought about optimizing only major builds, for example 7.0.0 final or betas/RC, not nightly ones. I didn't mind envolving/changing system - rather doing it by hand, once for major release. Anyway, devs are aware of such technique and will do what they want...
The whole compile process (both nightly as stables, as any branch) is completely automatic and done by our compile-farm. Doing any manual actions on them is not why we created the system ;)

Either way, back on the original subject: 3% is not worth the CPU time required and the effort to test and double check the changes. We have plenty of bandwidth, and if we run out of that, we have a mirror-network in creation. So that won't be done for sure ;)

In general, I see more and more people using 7-zip. I personally still don't have in installed on any of the boxes I manage (which are in fact a lot :p). Nevertheless, it might be worth the effort to look into this, and make it possible to generate 7z packages for a few targets. Based on the amount of downloads we can see if it is really used. I will prioritize this on my list as 'very low', and see if I can add it in the next few weeks.

Anyway, tnx for the pointers :)
The only thing necessary for the triumph of evil is for good men to do nothing.
CobraPL
Engineer
Engineer
Posts: 12
Joined: 13 Mar 2009 23:45

Re: Smaller ZIP/7z package (by from ~3.5% to ~28% for OpenTTD)

Post by CobraPL »

First post edited, detailed info :)
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Smaller ZIP/7z package (by from ~3.5% to ~28% for OpenTTD)

Post by CommanderZ »

3 or 30, OPENTTD is packed so it is easy to download in one file, not to be smaller. That megabyte really doesn't matter nowadays. You can unpack basic ZIP on every Windows PC with Win XP+ without installing any additional software, 7z hardly.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Smaller ZIP/7z package (by from ~3.5% to ~28% for OpenTTD)

Post by Conditional Zenith »

Yes, ditching zip is a bad idea, we know that already. Having something else as well wont stop people from downloading the zip file if zip is the only format they can handle. Anyway, "very low" is being generous I think.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests