Just a quick note on using UPX as a precompressor -- it is not a reversible operation, and as such would not be lossless compression.
-Jibz
UPX in theory should be reversable (giving exactly the same pre-compression binary after using -d to decompress it) as it is one of the few exe compressors which stores a copy of the exe's original relocation table etc. Of course, although files can often be decompressed back into the same exe, if they are left compressed after unzipping the archive (I'm not entirely sure of how ZipGenius works having never used it) there is a chance the will not work when run in a compressed form.
Here is an example of UPX decompressing properly: -
D:\TEST>copy buildwiz.exe before.exe
D:\TEST\buildwiz.exe => D:\TEST\before.exe
1 file copied
D:\TEST>upx --best buildwiz.exe
Ultimate Packer for eXecutables
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
UPX 1.24w Markus F.X.J. Oberhumer & Laszlo Molnar Nov 7th 2002
File size Ratio Format Name
-------------------- ------ ----------- -----------
462848 -> 126976 27.43% win32/pe buildwiz.exe
Packed 1 file.
D:\TEST>upx -d buildwiz.exe
Ultimate Packer for eXecutables
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
UPX 1.24w Markus F.X.J. Oberhumer & Laszlo Molnar Nov 7th 2002
File size Ratio Format Name
-------------------- ------ ----------- -----------
462848 <- 126976 27.43% win32/pe buildwiz.exe
Unpacked 1 file.
D:\TEST>md5sum *.exe
b385e22beec3e37250b8ccf7d86e916c *before.exe
b385e22beec3e37250b8ccf7d86e916c *buildwiz.exe
That being said, there is no guarentee that the file will decompress accurately back to the original as UPX works on processing information within the exe (Jibz could tell us a lot more on this) rather than an archiver which will just treat the exe as a raw data file. From experience it seems that generally only older/simpler exe files decompress back correctly as UPX does seem to mangle, or at least misunderstand, the headers of many newer exes. This is probably due to it not having been updated in many years (except some dodgy Alphas) so has problems with some of the tweaked formats generated by newer compilers such as Visual Studio 2003 onwards and may even refuse to compress them in some cases unless you force it to. Here is an example of UPX mangling a newer exe: -
D:\TEST>copy Tsizepro.exe before.exe
D:\TEST\Tsizepro.exe => D:\TEST\before.exe
1 file copied
D:\TEST>upx --best Tsizepro.exe
Ultimate Packer for eXecutables
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
UPX 1.24w Markus F.X.J. Oberhumer & Laszlo Molnar Nov 7th 2002
File size Ratio Format Name
-------------------- ------ ----------- -----------
2338816 -> 841216 35.96% win32/pe Tsizepro.exe
Packed 1 file.
D:\TEST>upx -d Tsizepro.exe
Ultimate Packer for eXecutables
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
UPX 1.24w Markus F.X.J. Oberhumer & Laszlo Molnar Nov 7th 2002
File size Ratio Format Name
-------------------- ------ ----------- -----------
2338816 <- 841216 35.96% win32/pe Tsizepro.exe
Unpacked 1 file.
D:\TEST>md5sum *.exe
fdb6a21d4bf28ac48386e39b231ae6d9 *before.exe
e416ee063fd5f278a1b9391fae658b40 *Tsizepro.exe
I wouldn't risk using this ZipGenius compression option personally, it seems to be a poor kludge to work around compression limitations in the Zip format, and I doubt it gives much real world compression gain as well as potentially mangling some of your executables. If you are going to make a non-standard format archive (Matteo said they were non-portable) the programmer might as well use a better compression algorithm such as LZMA and not mess around with risking user's executables.