Compressed executables...

Here you can discuss every aspect of Debian. Note: not for support requests!

Compressed executables...

Postby debroux » 2006-05-01 09:36

Under both Windows and GNU/Linux, I've been using UPX for a long time to compress many executables exceeding 1 MB uncompressed, saving hundreds of megabytes and seconds of loading time (noticeable on heavyweight OOo, for example) on my rather small laptop HD.
Obviously, updating packages replaces compressed versions by newer non-compressed versions. Therefore, I launch
Code: Select all
upx-ucl-beta `find [some folder] -size +1000k | awk 'BEGIN {ORS="\x20"} {print $1}'`

from time to time, often saving 40+ MB in /usr/bin alone.

I know that UPX cannot work with several kinds of executables, for example the ones that want to read data from themselves, but there are quite few of them. I knew it before experiencing it when I compressed _all_ files in /bin and /usr/bin, which after the next reboot required me to use a LiveCD to decompress everything and make the machine work properly again... Indeed, the boot process ended immediately, and I couldn't even login in the given prompt...

I suspect the Debian package system (or even other ones, be it RPM or Autopackage, for example), along with the packagers and testers obviously, can perform the compression at packaging time or at installing time. Is it true (I guess so), and is it hard to do ?

While I'm at it: on a related note, does someone know the exact technical reason why UPX will pack many Windows DLLs, but not *nix Shared Objects ? It must be something pretty serious and buried deep in the dynamic linking system, since I guess SOs would already be packable otherwise...
Posts: 7
Joined: 2006-04-14 07:22

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 8 guests