Re: DOS Translator Issues
- Posted by Vincent <darkvincentdude at yahoo.com> Apr 17, 2005
- 474 views
OtterDad wrote: > > I am also a fan of UPX. The main advantage for me is bandwidth, not HDD > space. When I deploy an application at work, it gets pushed out to 4,000 > users. UPX cuts my deployment cost in half. Call it what you will, but I’ll > take it. > > Yours, OtterDad > > Don't sweat it -- it's not real life. It's only ones and zeroes. Gene Spafford > OtterDad, In this example I translated/compiled Judith Evans's Enhanced IDE v18-22 on Win32Lib v0.60.5 with Regged Euphoria to C v2.5 Official translator with Open Watcom v1.3. I've done some examining and came up with this data: File Size --------- IDE.exe (uncompressed): 5,547,008 bytes (5,417 KB) (5.29 MB) IDE.exe (UPX max compressed): 953,856 bytes (931.5 KB) (0.91 MB) Memory Usage (program idle) --------------------------- IDE.exe (uncompressed): 7,507,968 bytes (7,332 KB) (7.16 MB) IDE.exe (UPX max compressed): 11,108,352 bytes (10,848 KB) (10.59 MB) File Size Difference -------------------- 4,593,152 bytes (4,485.5 KB) (4.38 MB) Memory Usage Difference ----------------------- 3,600,384 bytes (3,516 KB) (3.43 MB) Total Space Saved ----------------- 992,768 bytes (969.5 KB) (0.94 MB) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now lets compare the difference between the compressed executable and the compressed & uncompressed executable located in a compressed RAR archive (max compression). File Size --------- IDE.exe (uncompressed): 5,547,008 bytes (5,417 KB) (5.29 MB) IDE.exe (UPX max compressed): 953,856 bytes (931.5 KB) (0.91 MB) IDE.exe (uncompressed) in RAR archive: 964,807 bytes (941.2 KB) (0.92 MB) IDE.exe (UPX max compressed) in RAR archive: 927,105 bytes (905.37 KB) (0.88 MB) Size Comparison --------------- IDE.exe (uncompressed) in RAR archive versus IDE.exe (UPX max compressed) in RAR archive: 37,702 bytes (36.8 KB) (0.036 MB) ***************************************************************** *IDE.exe (uncompressed) in RAR archive versus * *IDE.exe (UPX max compressed): 10,951 bytes (10.7 KB) (0.01 MB) * ***************************************************************** Conclusion ---------- You can save < 970 KB (taking in account memory usage and file size) but at a cost of much greater memory usage, added memory overhead (that goes against OS swap file system) and slightly increased program loading time; To me the disadvantages outweigh the small benefits. If you compare the file size difference of a maximum compressed executable versus a RAR archive with the uncompressed executable in it, the difference is very very small. If your clients don't wish to install an archive utility program to read the archive format (exa: RAR, ZIP, 7z) then create a SFX (self-extract) executable which adds at most an additional 50 KB to the archive. There is no benefit of compression encryption, if a program cracker wanted to hex-edit your executable easily, he or she could just decompress it back to it's original context, the only guess work involved is figuring out which EXE/DLL compression utility program was used, and then use it's decompression option (that wouldn't be hard, since UPX is one of the best and most popular). So if you "do the math", you will realize that there really isn't any good advantages to EXE/DLL compression, and only offers more disadvantages then benefits. I do believe UPX is among the best for its purpose, but for a purpose not any better than any other compression solution, and most likely worse! Why waste your time? Regards, Vincent Without walls and fences, there is no need for Windows and Gates.