I've written a (relatively) small preprocessor/filter for compiled x86 code
that is completely reversible and typically increases compression ratio for
executable files by about 10% compared to the default filter (BCJ) used by
7Zip/LZMA for .EXE files. I guess this might be interesting for NSIS (in
terms of reducing download sizes), but I have no clue about NSIS internals,
so I'm not in the position to submit a full patch that adds this
functionality . Adding it as a feature request seemed like a reasonable
compromise. I've put the code online here: (written using VC++, but it
should be trivial to get working with other compilers). The actual
algorithm is in dis.cpp, the rest is mainly a small (Windows) demo app.

I've placed the code in the public domain; no strings attached. If you're
interested but have questions about the code or integration problems, feel
free to contact me (my email address is mentioned in readme.txt).