You are here

UPX always good?

3 posts / 0 new
Last post
zacha
Offline
Last seen: 16 years 1 week ago
Joined: 2006-02-22 07:46
UPX always good?

I just found out about UPX on this site and it seems like a very clever thing to use on portable programs. What I now wonder is three things.
1. Is it always good? Or can it cause unwanted problems in the programs?
2. What is the "downside" of it? Does it take more memory? Does it make the programs run slower from for example USB sticks?(USB 1.1? USB 2.0?)
3. What parameters should be used?
I have seen
-9
--best --compress-icons=0 --nrv2d --crp-ms=999999 -k
--best --compress-icons=0 --nrv2d --crp-ms=999999
on this boards... which to use?

justin
Offline
Last seen: 11 years 2 days ago
Developer
Joined: 2005-12-24 15:41
-9

I always use -9 and it works like a charm, so that's what I would recommend.

-Justin

Ryushi
Offline
Last seen: 14 years 3 months ago
Joined: 2005-12-09 09:30
some answers

Hi zacha,

here are some (justified) answers to your questions:

1.) yes, there is software which don't like to be upxed Sad
Every software checking if it is intact (esp. AV-software) will not start when upxed and there is other software which can't be upxed with the version 1.25 (even when using "--force") but only with 1.93beta, if at all.

2.) There is nearly now speedmalus when starting upxed software.
Most times upxed software starts faster from a USB stick (especially when connected via USB1.1) because transfer time from USB stick to RAM which depends on the filesize is the bottleneck and with modern CPUs you don't notice the extremly fast decompression.
But there is a negative point - upxed "shared" DLLs can't be used by different processes and will be load multiple times in memory (one for every process). You have similar negative memory usage effects when you run two or more instances of an upxed software.
But I think most times and in most situations the positive effects outperform the negative ones Wink

3.) This is what I use (all EXEs being in path):
sweep upx --best --compress-icons=0 --nrv2d --crp-ms=999999 *

Sweep (Package with the exe + source) is used to run a command (here upx.exe) in all subdirs too - else you have to do it manually.

Using the "--compress-icons=0" switch you can use embedded icons (in the upxed exe/dll - look which icons you can choose in PStart when not using this switch ;)) and with the "--crp-ms=999999" switch most files are compressed something better.
With the "-k" switch you will keep a copy of the unupxed file.
There may be some extremly rare cases - I don't encounter any when I make tests Wink - when the "--nrv2b" switch insteed "--nrv2d" will give slightly besser compression but normally "--nrv2d" is much better.

Hope I could help Wink

Cya Ryushi

Topic locked