I wonder how this compares to the one in UPX.
I want to make the decoder small enough to be used in compressed executables. Where decompression performance doesn't matter because LZMA is far from fast decompression, and small code without inlining makes it worse (but bearable).
https://github.com/upx/upx/blob/devel/src/stub/src/arch/amd6...
Then it takes ~2500 bytes, mine is ~500 (static version). But the decompression speed for larger code should be higher, as I noticed.