made bzip2 smaller than zlib mode !!!
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1241 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d14d52c461
commit
77cb319b8c
9 changed files with 38 additions and 569 deletions
|
@ -69,16 +69,14 @@
|
|||
|
||||
// NSIS_ZLIB_COMPRESS_WHOLE makes all install data in zlib installers
|
||||
// compressed together. Runtime requirements are increased, but potential
|
||||
// for compression is as well. Adds approximately 1kb of disk footprint,
|
||||
// and requires that the installer create a (potentially large) temporary
|
||||
// file in the temp directory.
|
||||
// for compression is as well. Requires that the installer create a
|
||||
// (potentially large) temporary file in the temp directory.
|
||||
// #define NSIS_ZLIB_COMPRESS_WHOLE
|
||||
|
||||
// NSIS_BZIP2_COMPRESS_WHOLE makes all install data in bzip2 installers
|
||||
// compressed together. Runtime requirements are increased, but potential
|
||||
// for compression is as well. Adds approximately 1kb of disk footprint,
|
||||
// and requires that the installer create a (potentially large) temporary
|
||||
// file in the temp directory.
|
||||
// for compression is as well. Requires that the installer create a
|
||||
// (potentially large) temporary file in the temp directory.
|
||||
#define NSIS_BZIP2_COMPRESS_WHOLE
|
||||
|
||||
// if NSIS_COMPRESS_BZIP2_SMALLMODE is defined, bzip2's decompressor uses
|
||||
|
|
|
@ -88,11 +88,6 @@ SOURCE=..\bzip2\decompress.c
|
|||
SOURCE=..\bzip2\huffman.c
|
||||
# ADD CPP /Gz
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\bzip2\randtable.c
|
||||
# ADD CPP /Gz
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
|
|
|
@ -7,18 +7,16 @@
|
|||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
#ifdef NSIS_COMPRESS_USE_ZLIB
|
||||
#include "../zlib/zlib.h"
|
||||
#define genrtable()
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_COMPRESS_USE_BZIP2
|
||||
#include "../bzip2/bzlib.h"
|
||||
static char bz2_needreinit;
|
||||
void NSISCALL genrtable();
|
||||
|
||||
#define z_stream bz_stream
|
||||
#define inflateInit(x) { if (BZ2_bzDecompressInit(x)<0) return _LANG_INVALIDCRC; }
|
||||
#define inflate(x) BZ2_bzDecompress(x)
|
||||
#define inflateReset(x) { if (bz2_needreinit) { BZ2_bzDecompressEnd(x); inflateInit(x); } else bz2_needreinit++; }
|
||||
#define inflateReset(x) { if (bz2_needreinit) { inflateInit(x); } else bz2_needreinit++; }
|
||||
#define Z_OK BZ_OK
|
||||
#define Z_STREAM_END BZ_STREAM_END
|
||||
#endif//NSIS_COMPRESS_USE_BZIP2
|
||||
|
@ -62,7 +60,6 @@ const char * NSISCALL loadHeaders(void)
|
|||
data=(void*)my_GlobalAlloc(h.length_of_header);
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
genrtable();
|
||||
inflateInit(&g_inflate_stream);
|
||||
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue