Page 1 of 1

UPX compression for application binaries/files?

Posted: Wed Nov 02, 2022 11:45 am
by Jasper

Hi there

Can someone let me know if it is a good idea to compress an executable binary/file using UPX before creating a PET application?

https://upx.github.io/

Thanks in advance


Re: UPX compression for application binaries/files?

Posted: Wed Nov 02, 2022 8:09 pm
by williams2

A PET file is basically a tar.gz file, which is compressed using gzip or xz or lzma etc etc.
So upx would not make much difference to the size of a PET file.

Installing a PET uncompresses all the files in the PET file.
So upx-ed executables will take a little less space in a save file.

If a upx-ed file is run, it is copied to ram and it unzips itself.

So upx saves a little space in the storage space. for example, a savefile.

A upx-ed file is uncompressed when it executes
so it uses about the same space in ram as it executes, whether upx-ed or not.

So it might save a little space in the file system it is saved to.
It will not save space in a PET file.
It will not save space in the ram that the executable uses when it is running.

It probably doesn't make much difference either way.


Re: UPX compression for application binaries/files?

Posted: Thu Nov 03, 2022 6:43 am
by Jasper

Thank you for explaining this to me :thumbup:

I guess the application really is for developers who want a small file size to distribute their applications.

I did try it out as it came as binary. So your right that it saves a little space in the Save file.