Large Delivery Binaries?
HI all,I found a little known tool on Mac OS X that can *significantly* shrink the size of delivered binary files from LWM. It is called gzexe. Unfortunately, there is a bug in the supplied gzexe script from Apple that is easily remedied. They fail to provide a mktemp template in their delivered gzipped preambles. A corrected version is included below.
Using gzexe'd binaries does not seem to slow the execution by very much at all. But a drawback to using gzexe'd binaries is that they are unpacked in a temp directory, and hence lose memory of their original location. That may or may not be a problem for you. If you use the image-pathname to derive the path of the executable for use in locating other items, such as runtime dylibs, then you are out of luck and have to find another way back to the original folder.
Another other possible disadvantage to using gzexe is that the executable is no longer amenable to patching, since it is packed by the Lempel-Ziv algorithm.
The shrinkage made possible by running gzexe against deliverables is huge. An example of mine has a delivered binary image size of 30.9 MB, and after gzexe it is now 5.8 MB.