Biarchiv
6th December 2008 15:03 UTC
UPX and Compress Installer.exe
Hello,
I have a problem that I have large special files that
are not compressed with lzma good. I do not know why.
When I compressed the created installer exe then I got
1200 kb
compressed with zip 800kb.
I would like to compress with upx all data again. Is there
a way?
Anders
6th December 2008 16:13 UTC
why not use zlib compression then?
Biarchiv
6th December 2008 17:48 UTC
Originally posted by Anders
why not use zlib compression then?
zlib is larger than lzma.
Is there a way that UPX packed an installer.exe,
so that the installer.exe worked?
kichik
6th December 2008 17:53 UTC
UPX doesn't support compression of the installer's data. You'll have to precompress it.
Yathosho
6th December 2008 18:04 UTC
lzma compression of the data plus upack header compression is the best you can get.
for header compression use
!packhdr "$%TEMP%\exehead.tmp" "upack.exe $%TEMP%\exehead.tmp -c6 -f273" ;upack
or
!packhdr tmpexe.tmp "UPX --best -f -q -v --ultra-brute --all-methods --all-filters --compress-icons=0 tmpexe.tmp" ;upx
LoRd_MuldeR
6th December 2008 19:21 UTC
Note that !packhdr will only compress the EXE header of the installer, NOT the data block.
For the data I'd use LZMA compression and increase the dictionary size to 128+ MB. That's really the "best" compression you can get. If the data is already compressed, it can't be compressed any further though! It's like putting a ZIP archive into a ZIP archive. It won't get any smaller. If recursive compression would work, one could take a random file of any size and compress that file over and over again, until it's one single Byte in size...