Page 1 of 1

UPX compress the main executable?

Posted: 03 Nov 2006 12:50
by lukescammell
This isn't really a wish, just a random "out-there" thought.

Have you considered using UPX to compress the main executeable? I've just had a bash at doing just that. I used the following command upx *.* --brute --nrv2d -k (nice and lazy) to compress xyplorer_5.20.0060 from 1.92 MB (2,011,136 bytes) to 616.00 KB (630,784 bytes).

Even if you cba to do this for every beta (understandable perhaps), it may be worth doing it for the main releases?

Everything still appears to work, and it even makes the ZIP file download a couple of hundred KB smaller. I haven't done any benchmarking yet to see if it's slower or even faster, but I'm sure you'd be able to do that better than anyone Don.

Notes:
-k creates a backup of the original files it's compressing.
--brute does multiple pass compressing to find the best method of compressing the executable, but is the slowest.

XYplorer.exe [ver 5.20.0064] - 1.92 MB (2,017,280 bytes) --> 617.50 KB (632,320 bytes)
XYplorer.exe [ver 5.40.0000] - 1.93 MB (2,020,352 bytes) --> 618.50 KB (633,344 bytes)
XYplorer.exe [ver 5.40.0001] - 1.93 MB (2,022,400 bytes) --> 618.50 KB (633,344 bytes)
XYplorer.exe [ver 5.40.0002] - 1.93 MB (2,022,912 bytes) --> 619.00 KB (633,856 bytes)
XYplorer.exe [ver 5.40.00.06] - 1.94 MB (2,035,200 bytes) --> 621.00 KB (635,904 bytes)
XYplorer.exe [ver 5.40.00.08] - 1.94 MB (2,038,272 bytes) --> 622.00 KB (636,928 bytes)

Re: UPX compress the main executable?

Posted: 04 Nov 2006 11:48
by admin
lukescammell wrote:This isn't really a wish, just a random "out-there" thought.

Have you considered using UPX to compress the main executeable? I've just had a bash at doing just that. I used the following command upx *.* --brute --nrv2d -k (nice and lazy) to compress xyplorer_5.20.0060 from 1.92 MB (2,011,136 bytes) to 616.00 KB (630,784 bytes).
Wow, impressive! Something to come back to eventually. Thanks for the info!

Re: UPX compress the main executable?

Posted: 14 Nov 2006 07:03
by admin
lukescammell wrote:Have you considered using UPX to compress the main executeable?
Quick thought: Do you know by any chance whether this compression works as a safety belt against reverse engineering (software piracy)?? I would think so, but have not researched or tested yet.

Posted: 14 Nov 2006 10:08
by lukescammell
I don't know off the top of my head. I don't program, so this is purely speculation, but I would imagine you could just use the decompressor sme how to decompress the executable and then reverse engineer as per normal? If you can't do that, then I guess it could help!

Posted: 14 Nov 2006 12:14
by admin
lukescammell wrote:I don't know off the top of my head. I don't program, so this is purely speculation, but I would imagine you could just use the decompressor sme how to decompress the executable and then reverse engineer as per normal? If you can't do that, then I guess it could help!
If they'd support password-protected compression and if the compressed app does not become any slower (which I doubt but have not tested yet), then I would happily go for UPX, of course!

Posted: 14 Nov 2006 13:01
by lukescammell
Certainly my startup values don't appear to be that much slower than other people's and I always UPX the executables of the betas since I posted this thread. Like I said though, I'm sure you have better ways of benchmarking XY. Providing this is the case, is it not worth UPXing it anyway just from the point of view of it being smaller for people's USB sticks? Again, I'm not suggesting you do it for each beta (although it would save me doing it each time :D and maybe some bandwidth for you?), but it would certainly make sense for the main release on your site.

Regarding password protection... I'm not sure how that would work since as soon as you run the executable it's decompressed into memory anyway no?

Re: UPX compress the main executable?

Posted: 14 Nov 2006 17:28
by jacky
admin wrote:Quick thought: Do you know by any chance whether this compression works as a safety belt against reverse engineering (software piracy)?? I would think so, but have not researched or tested yet.
I don't really think so, especially since UPX allows you to decompress any compressed executable: upx -d compressed.exe
(and I don't think there's a password compression of any kind no)
wikipedia wrote:UPX can be used to prevent direct disassembly, mask strings literals and modify signatures. Although this does not eliminate the chance of reverse engineering, it can make the process more costly
But still, UPX is a great soft and is known to have a great compress ratio, and keep the apps fast.

Posted: 18 Jul 2007 13:48
by lukescammell
Just so you don't forget about this one day Don ;)

XYplorer.exe [ver 6.10.0064] - 2.18 MB (2,289,664 bytes) --> 631.50 KB (646,656 bytes)

This means that XY would actually fit on a floppy :)

Posted: 23 Jul 2007 09:36
by admin
lukescammell wrote:Just so you don't forget about this one day Don ;)

XYplorer.exe [ver 6.10.0064] - 2.18 MB (2,289,664 bytes) --> 631.50 KB (646,656 bytes)

This means that XY would actually fit on a floppy :)
Great. What is a floppy? :wink: (Did not use one for years)