On 9/10/07, Simon Bradley [EMAIL PROTECTED] wrote:
On 9/9/07, James Paige [EMAIL PROTECTED] wrote:
On Sun, Sep 09, 2007 at 06:06:30PM +1200, Ralph Versteegen wrote:
On 9/7/07, James Paige [EMAIL PROTECTED] wrote:
Ack! How the heck did I forget hspeak? No wonder I had room for
madplay+oggenc :(
Good news! We forgot UPX!
After running game and custom through UPX on brute force strength
(eclipsed only by the ULTRA-BRUTE setting in terms of CPU wastage) I
managed add madplay, oggenc, plotdictionary.html and whatsnew.txt into
the floppy package with just 37kb of floppy space to spare. Yes, it
takes several minutes to compress each of game and custom, but we're
only doing it once.
Why did you leave whatsnew.txt out anyway? Forgot again?
The commands: (should we add upx.exe to /support?)
upx --brute game.exe
upx --brute custom.exe
Interesting. I had totally abandoned UPX, because when I last tried it
(years ago) compressing with UPX compressed EXEs always resulted in ZIP
compression what was worse than if I had never used UPX... but I didn't
know about --brute, and I guess UPX's compression algorithms could have
improved since then.
I had a 2002 version of UPX. Updating, I found they greatly simplified
the commandline options (--brute is new), and it seems compression is
also a lot better. But UPX does much better than zipping. (.zip is a
pretty bad format anyway) See below
(If we were really desperate to squeeze out extra kB, we could
decompress oggenc, madplay and hspeak and recompress them at brute
force strength (which tries 36 compression settings), and do
SDL_mixer.dll too (compressed dll's can't be shared between programs
using the same dll, but this shouldn't be too big a problem for our
custom build)
Actually, that is probably a good thing. Since we are not installing our
dll's system-wide, it is better that they can't be shared with other
apps.
We could run nightly builds of game and custom through UPX at --best
setting too: this shaves about 100kb off the zips, and only takes a
couple seconds.
The nightyly builds run on a Qemu instance on a MacOS X box, and they
are slooow, so it would be a heck of a lot more than a few extra
seconds-- but it could still be worth it.
What's a floppy disk?
Seriously, this machine is now about 9 years old, and I can probably
count the number of times I've used a floppy on two hands (in fact,
the only occasion I can remember was when I needed some files off my
Atari ST, which was a 720k floppy anyway).
I use USB drives for carrying things around these days, and my
smallest capacity is 16Mb.
I don't have a USB drive, I burn CDs for large stuff (since it is
generally things that I would like a backup of anyway), use networks,
and occasionally floppies when windows dies or I boot into pure DOS or
I want to use an old 486 I have lying around.
I really don't see the point in spending a lot of time on this.
Well, if anyone uses it they'd might like those utilities. If it's
scrapped, I think we could still do with ohrrpgce_play, since a lot of
OHR games come without (or with old builds of) Game, and the full
distribution is quite large.
I'm sure UPX compression can be beaten by non-executable compression,
such as the free open-source 7zip. Is this distribution supposed to be
executable from the floppy or just unpackable from the floppy?
OK, I tried out 7zip:
Using game.exe at various UPX compression, and trying zip -9, 7zip
(ultra, deflate), winrar (best compression) to produce .zips, and also
a .7z:
game.exe: 662,528 bytes
zip: 258,250
7zip: 248,607
winrar: 257,933
game.7z: 182,914
game.exe through UPX --best: 208,384
zip: 204,933
game.exe through UPX --brute: 189,952
zip: 187,324
winrar: 187,165
7zip: 186,751
game.7z: 189,264
So UPX --brute shaves 70kb off the zip.
7zip did better .zip compression than anything else, but it was still
way off UPX. I should note that UPX tries LZMA, the default algorithm
for .7z files., while zips morely use the notsogood deflate algorithm.
TMC
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org