News:

NOTICE: This forum is mostly an archive, though new posts are allowed. Registration may require manual admin activation. After registering visit https://bitsum.com/contact/ to request account activation.

Main Menu

Compression of PECompact 2.78 vs newer releases

Started by Przemek, August 16, 2008, 08:15:39 AM

Previous topic - Next topic

Przemek

I've been using PECompact 2.78 for quite some time until I decided to upgrade to the latest version yesterday. However I was surprised to see that the compression ratio in the latest PECompact 2.92 is a lot worse. My uncompressed executable is 11 MB and PEC2.92 compresses it to 6.6 MB (40.88% ratio) while PEC2.78 compressed it to only 2.3 MB (78.92% ratio). Where is that huge difference coming from? I downloaded other releases after 2.78 and they all seem to have similar (worse) compression ratio. I only use '/Ri:No' commandline parameter.

Jeremy Collake

#1
Thanks for the report. I apologize for the delay in response.

[ conjecture, guesses deleted ]

If you can send me a link to the uncompressed executable I can figure out what is going on for sure..

Thanks,
Jeremy
Software Engineer. Bitsum LLC.

Przemek

Using this commandline parameter didn't help, so I've sent you the link to the executable in the private message. Thank you for your time!

Jeremy Collake

#3
It looks like this is due to the newer version of PECompact preserving the debug information (for later use with minidumps and such). The debug information in this executable is quite large and stored in the overlay/extra-data area.

I am correcting the behavior of /StripDebug:Yes for modules like this.

In the meantime, you can use PETrim on the executable first, to strip the debug information and the overlay completely. Then compress with PECompact.


PETrim.exe cafeagent.exe
PEC2.exe cafeagent.exe


Software Engineer. Bitsum LLC.

Jeremy Collake

#4
This should be fixed now, with the latest build being v2.94 final. The problem was two part:

1. Improper handling of debug directories generated by non-Microsoft linkers, causing inability to strip or relocate.
2. Change in default behavior of extra-data/overlays (where the debug data was kept in this exe).

I addressed both issues completely and properly in v2.94, removing the overlay only if, after stripping, it contains nothing else. In the case of your executable, after the debug directory is stripped, the overlay is indeed empty and is also removed. If you choose to preserve debug information, the debug data is relocated into the last section of the executable and the overlay removed.
Software Engineer. Bitsum LLC.

Przemek

Thanks a lot Jeremy! Your support is really outstanding.