NSIS/Source/zlib/INFLATE.C
justin1014 6a6260aeb6 reduced zlib size by 16 or so
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1208 212acab6-be3b-0410-9dea-997c60f758d6
2002-09-27 05:17:56 +00:00

51 lines
1.1 KiB
C

#include "../exehead/config.h"
#ifdef NSIS_COMPRESS_USE_ZLIB
/* inflate.c -- zlib interface to inflate modules
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* this has been HEAVILY modified for NSIS use, and is no longer compatible
* with the stock zlib.
*/
#include "zutil.h"
#include "infblock.h"
#include "inftrees.h"
#include "infcodes.h"
#include "infutil.h"
int ZEXPORT inflateReset(z_streamp z)
{
if (z == Z_NULL || z->state == Z_NULL)
return Z_STREAM_ERROR;
z->total_in = z->total_out = 0;
inflate_blocks_reset(&z->state->blocks, z, Z_NULL);
return Z_OK;
}
static struct internal_state __mstate;
int ZEXPORT inflateInit(z_streamp z)
{
void inflate_blocks_init(z_streamp z,struct inflate_blocks_state *s);
z->state=&__mstate;
// if ((z->state =
// (struct internal_state FAR *) ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)
//return Z_MEM_ERROR;
inflate_blocks_init(z,&z->state->blocks);
return Z_OK;
}
int ZEXPORT inflate(z_streamp z)
{
return inflate_blocks(&z->state->blocks, z, Z_OK);
}
#endif