Converted the LZMA decoder to a state machine like zlib and bzip2. The new method is smaller and safer because there is no need for hideous thread synchronization. The new method also works on Windows 95, unlike the previous one which was using InterlockedCompareExchange.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3527 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-04-16 22:44:03 +00:00
parent c579a1e4b0
commit 3f483e0163
3 changed files with 453 additions and 516 deletions

View file

@ -14,12 +14,12 @@
#ifdef NSIS_COMPRESS_USE_LZMA
#include "../7zip/LZMADecode.h"
#define z_stream CLZMAState
#define z_stream lzma_stream
#define inflateInit(x) lzmaInit(x)
#define inflateReset(x) lzmaInit(x)
#define inflate(x) lzmaDecompress(x)
#define Z_OK 0
#define Z_STREAM_END 1
#define inflate(x) lzmaDecode(x)
#define Z_OK LZMA_OK
#define Z_STREAM_END LZMA_STREAM_END
#endif
#ifdef NSIS_COMPRESS_USE_BZIP2