NSIS/Source/zlib/INFLATE.C
justin1014 f8ec619e4e 52 bytes off of zlib
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1227 212acab6-be3b-0410-9dea-997c60f758d6
2002-09-30 16:59:41 +00:00

45 lines
1,001 B
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;
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;
}
#endif