applied patch #2918870 - use of the zlib compression library provided by the system

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6030 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
f0rt 2010-02-07 21:24:09 +00:00
parent 9f7710ace6
commit c39ffff404
34 changed files with 280 additions and 7431 deletions

View file

@ -18,7 +18,7 @@
#define __CZLIB_H__
#include "compressor.h"
#include "zlib/ZLIB.H"
#include <zlib.h>
class CZlib : public ICompressor {
public:
@ -27,7 +27,13 @@ class CZlib : public ICompressor {
int Init(int level, unsigned int dict_size) {
stream = new z_stream;
if (!stream) return Z_MEM_ERROR;
return deflateInit(stream, level);
stream->zalloc = (alloc_func)Z_NULL;
stream->zfree = (free_func)Z_NULL;
stream->opaque = (voidpf)Z_NULL;
return deflateInit2(stream, level,
Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY);
}
int End() {