The law of physics states that the mass of an object is directly proportional to the amount of matter it contains, in relation to computing we can also say that the size of an executable is proportional to the amount of data it contains, when we say data we mean the various dependencies and other files embedded inside of the executable, this means that the larger the dependencies, data file, plugins e.t.c the larger the executable will be.
These implies that an executable with a size of about 2MB with dependencies that total 100MB will become 102MB when it has been converted into a portable executable. This spells trouble for a developer that is concerned about the size of the executable he is shipping to his customers, infact customers are known to ignore an executable just because of its size.
ELFex linker ships with a powerful compression feature that will make you care less about the size of the executable no matter the amount of data or dependencies you embed inside of it. To identify the compression feature in ELFex linker please see the diagram below
The arrow in the diagram shows where to access the compression feature, by default the compression is set to the highest level (9) for the executable however you can deactivate the compression setting or set it to a level you are comfortable with
We will now demonstrate the power of the compression setting of ELFex Linker. We will be demonstrating using a program called "Wave Simulator", the dynamic executable size is 25.9MB as you can see in the image below
Now when we convert the dynamic executable to a portable one with all its dependencies linked into it and without the compression setting the size becomes 42MB as you can see in the image below
Now lets create the executable with the compression setting:
From the above image we notice the executable has greatly shrinked and become 20.4MB which is by far smaller than when we created the executable without the compression setting, The executable contains all its dependencies but notice its even smaller than the original executable .The interesting part of it all is that even the compression will not affect the runtime of the executable. You are free to download ELFex Linker and test this feature
In the next section we will explain what the NSS Libraries setting is for and how to use it