Jump to content

Best Pe Compressor...

Teddy Rogers

Recommended Posts

Teddy Rogers

I was thinking the other day about which is the best PE compressor as in terms of actual compression ratio. Personally I like to think in real world usage NsPack is king, simply because it has very good compression ratios using fast compression and decompression routines plus it handles a wide variety of PE files and formats without any problems. Some people say PeCompact is king but I've come across to many times files it struggles compressing or causes errors after compressing and I don't think its LZMA compression routines are as tight as they could be for the specification. WinUpack is also good but very slow decompressing and to be honest I haven't found many files it beats compressing in size over NsPack.

Without starting a "which is better" debate between the above mentioned three I am interested to hear from anyone that has any other suggestions as to what compressors could be king. I've recently come across a couple of obscure compressors that has made me raise an eyebrow or two over their compression results which better the above three. I'll not name them just yet and I haven't given them a full variety of testing. If you know of some tight PE compressor(s) it would be interesting to hear about them...


Link to comment

SPack by bagie has a compression ratio similar to NsPack.

Download link (including src):

Thanks to bagie for this tool!


Edited by anorganix
Link to comment

how the **** spack with aplib can be compared to nspack that uses lzma?

i prefer upx due fastest decompression, if speed is not important of app runing after execute i use nspack due best compression ratio.

also upx uses less memory due he doesnt need any to decompress like nspack

Link to comment

As we know aplib is better for smaller files (FSG 2.0 has nice implementation) and LZMA just kicks *** on bigger files. So my personal .exe packing favourite is NsPack due to high compression ration and compatibility. But for .dlls I use UPX since it is faster than NsPack.

Link to comment

I said compression ratio is similar, not algo is similar... anyway no need for you to get annoyed for an oppinion.


Edited by anorganix
Link to comment

how compression ratio is similar? aplib like upx's ucl is simple bitpairing compression, every other, that has to create tables for decompress will beat it, like rar or lzma, because they sort most occurences of string lenght,position and try to write it as short as possible. bitpairing doesnt support it, but thats why upx can beat everything in memory requirments and speed. also aplib is worse than ucl, have you tried for example upx -9 --best --brute it then tries to compress file 30 times, and leave smallest. due it tries nrv2d,nrv2d,nrv2e and 10 filters for every algo.

you can also try my hlz

Overall: size in bytes

uncompressed 55.181.834

hlz 15.999.552

ucl 17.004.293

winrar 13.294.921

zip 23.295.541

after all only winrar can beat me:) but isn't so fast as i am:P

Decompression speed of fast decompressors:

file hlz ticks hlz ms hlz MB/s ucl MB/s

a.tga 201.801.183 125 41.878 26.967

b.tga 23.754.234 15 145.706 121.337

c.tga 6.518.008 0 168.805 141.772

d.tga 62.526.311 31 55.354 33.080

e.tga 30.750.166 15 274.795 255.524

et4.exe 217.963.618 140 164.554 139.200

nvoglnt.dll 99.623.450 62 77.626 71.571

shell32.dll 131.813.240 78 94.294 81.215

Link to comment
Teddy Rogers

I think possibly he means version 1.0 of Simple Pack which also used LZMA as one of its options, it actually does have very good compression ratios. I'm not sure why Bagie opted to go down the aPLib route in later versions... :dunno:


Link to comment

ohh i didnt knew that, well maybe because there is no good and fast lzma compressor, decompressor. i also wanted to convert lzma to asm but i left it due c++ sdk code is a mess and hard to understand.

and as spack is simple pack, maybe he wanted to have also compressor and its stub simple, with lzma its impossible.

also ap0x uses aplib in his rlpack.

but if you wanna know another reason to use upx except speed, its compatibility, try new vc++ exes like i had problem with unpacked arma, upx handles those, nspack not, so far only pecompact was compatible with it, case was packed exe complained that he cant load fpu handling code.

Edited by human
Link to comment

For Sure.

I had a little time for a short test, picked up a prog and compared with a few packer.


This test does not reflect my favourite packer. I use very often Nspack, PEC2

..and Upx in all other things. But I'm open to change my mind when I see good results.

Let's start:

Advanced JPEG Compressor 5.0


2.478.080 unpacked

2.478.080 PESpin 1.304 (doesn't pack)

806.912 SimplePack, v1.2 beta Methode 1

811.008 SimplePack, v1.2 beta Methode 1, pack resources

684.032 SimplePack, v1.0 LZMA

684.032 SimplePack, v1.0 LZMA, compress all resources

618.496 KByS Packer 0.28 beta

..all other actual common packer

(SimplePack v1.0 apLib, Nspack, PEC2, hmimys's PE-Pack, !EPack)

did not handled the icon correct so they were not more testet.

P.S.: Does someone what kind of codec/which algo KByS Packer uses?

Link to comment

BeRoEXEPacker seems to be promising:

It can compress win32 EXEs & DLLs

It uses LZBRS, LZBRR and LZMA compression. The compression method is selectable per command line parameter (default is LZMA) (BeRoEXEPacker has better compression rates than UPX!)

It can strip unused data (debug, relocations, resources)

It’s written in Borland Delphi 5.0 with my own super small system unit

It’s originally developed for the use in the demoscene.

It’s small!

Link to comment

Here is my test for RLPack Full Version 1.12 with LZMA:

 Mozilla FireFox 1.5 (firefox.exe)  - 6.83 MB
nSPack 3.5 - 2.54 MB
PeCompact 2.79 - 2.55 MB
WinUPack 0.39 - 2.56 MB
ASPack 2.12 - 2.76 MB
RLPack Full Version 1.12 - 2.81 MB
UPX 2.02 - 2.88 MB {NRV dow}
Link to comment

I read everytime just LZMA.

Only PEC2 tells to using also LZMA2,

which of the LZMA supporting tools have LZMA

and which one has LZMA2? :unsure:

Link to comment

The best packer imho is Nspack, followed by Expressor.

They both offer good packing rates and acceptable speed, whereas packers like WinUpack create very small but slow executables.

Nspack even offers .net support, which works quite good (some probs with XP style in .NET FX 1.1 apps tho) and has a great compatibility with any other PE32 file.

The same with Expressor ;)

Link to comment
  • 2 weeks later...

I said I would say which are the best PE compressors I have found. Probably the best for size are Kkrunchy and BeRoEXEPacker. Both of these give extremely good compression ratios and were specifically designed for the demo scene, in particular 40k and 64k intros. The only problem with these compressors is compatability, releases (executables to compress) were tailor made with the compressors in mind.

I think overal NsPack is still the king for real world usage... :rolleyes:


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...