UPX compression for application binaries/files?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
Jasper
Posts: 1686
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 716 times
Been thanked: 384 times

UPX compression for application binaries/files?

Post 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

williams2
Posts: 1036
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 297 times

Re: UPX compression for application binaries/files?

Post 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.

User avatar
Jasper
Posts: 1686
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 716 times
Been thanked: 384 times

Re: UPX compression for application binaries/files?

Post 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.

Post Reply

Return to “Users”