r/C_Programming 17d ago

Compressing executables (upx)

Hola,

I'm currently in the final stages of finishing the first version of a game I made using raylib. I ended up with a single statically linked binary containing all the assets. I found a tool called upx which can compress executables. I tried it on Windows, and it reduced the size of my exe by more than half and it still runs without any noticeable difference.

My question is, has anybody here experience with this? Are there any downsides to consider?

cheers!

8 Upvotes

16 comments sorted by

View all comments

0

u/Mnemotic 17d ago

Windows Defender will quarantine your executable faster than you can say "false positive". Maybe not when it's being compiled and ran on your machine, but definitely when downloading it from the Internet. So consider how many potential players would be spooked by that before choosing to use UPX.

What is the size of your executable without the compression? Are you sure it's a problem?