Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
inflate.c File Reference
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#include "inffixed.h"

Macros

#define UPDATE(check, buf, len)
 
#define CRC2(check, word)
 
#define CRC4(check, word)
 
#define LOAD()
 
#define RESTORE()
 
#define INITBITS()
 
#define PULLBYTE()
 
#define NEEDBITS(n)
 
#define BITS(n)
 
#define DROPBITS(n)
 
#define BYTEBITS()
 

Functions

local int inflateStateCheck OF ((z_streamp strm))
 
local void fixedtables OF ((struct inflate_state FAR *state))
 
local int updatewindow OF ((z_streamp strm, const unsigned char FAR *end, unsigned copy))
 
local unsigned syncsearch OF ((unsigned FAR *have, const unsigned char FAR *buf, unsigned len))
 
local int inflateStateCheck (z_streamp strm)
 
int ZEXPORT inflateResetKeep (z_streamp strm)
 
int ZEXPORT inflateReset (z_streamp strm)
 
int ZEXPORT inflateReset2 (z_streamp strm, int windowBits)
 
int ZEXPORT inflateInit2_ (z_streamp strm, int windowBits, const char *version, int stream_size)
 
int ZEXPORT inflateInit_ (z_streamp strm, const char *version, int stream_size)
 
int ZEXPORT inflatePrime (z_streamp strm, int bits, int value)
 
local void fixedtables (struct inflate_state FAR *state)
 
local int updatewindow (z_streamp strm, const Bytef *end, unsigned copy)
 
int ZEXPORT inflate (z_streamp strm, int flush)
 
int ZEXPORT inflateEnd (z_streamp strm)
 
int ZEXPORT inflateGetDictionary (z_streamp strm, Bytef *dictionary, uInt *dictLength)
 
int ZEXPORT inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength)
 
int ZEXPORT inflateGetHeader (z_streamp strm, gz_headerp head)
 
local unsigned syncsearch (unsigned FAR *have, const unsigned char FAR *buf, unsigned len)
 
int ZEXPORT inflateSync (z_streamp strm)
 
int ZEXPORT inflateSyncPoint (z_streamp strm)
 
int ZEXPORT inflateCopy (z_streamp dest, z_streamp source)
 
int ZEXPORT inflateUndermine (z_streamp strm, int subvert)
 
int ZEXPORT inflateValidate (z_streamp strm, int check)
 
long ZEXPORT inflateMark (z_streamp strm)
 
unsigned long ZEXPORT inflateCodesUsed (z_streamp strm)
 

Macro Definition Documentation

◆ BITS

#define BITS ( n)
Value:
((unsigned)hold & ((1U << (n)) - 1))

◆ BYTEBITS

#define BYTEBITS ( )
Value:
do \
{ \
hold >>= bits & 7; \
bits -= bits & 7; \
} while (0)

◆ CRC2

#define CRC2 ( check,
word )
Value:
do \
{ \
hbuf[0] = (unsigned char)(word); \
hbuf[1] = (unsigned char)((word) >> 8); \
check = crc32(check, hbuf, 2); \
} while (0)
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uInt len)
Definition crc32.c:237
lzma_check check
Definition container.h:292

◆ CRC4

#define CRC4 ( check,
word )
Value:
do \
{ \
hbuf[0] = (unsigned char)(word); \
hbuf[1] = (unsigned char)((word) >> 8); \
hbuf[2] = (unsigned char)((word) >> 16); \
hbuf[3] = (unsigned char)((word) >> 24); \
check = crc32(check, hbuf, 4); \
} while (0)

◆ DROPBITS

#define DROPBITS ( n)
Value:
do \
{ \
hold >>= (n); \
bits -= (unsigned)(n); \
} while (0)

◆ INITBITS

#define INITBITS ( )
Value:
do \
{ \
hold = 0; \
bits = 0; \
} while (0)

◆ LOAD

#define LOAD ( )
Value:
do \
{ \
put = strm->next_out; \
left = strm->avail_out; \
next = strm->next_in; \
have = strm->avail_in; \
hold = state->hold; \
bits = state->bits; \
} while (0)
size_t * left
Definition util.h:104

◆ NEEDBITS

#define NEEDBITS ( n)
Value:
do \
{ \
while (bits < (unsigned)(n)) \
PULLBYTE(); \
} while (0)

◆ PULLBYTE

#define PULLBYTE ( )
Value:
do \
{ \
if (have == 0) \
goto inf_leave; \
have--; \
hold += (unsigned long)(*next++) << bits; \
bits += 8; \
} while (0)

◆ RESTORE

#define RESTORE ( )
Value:
do \
{ \
strm->next_out = put; \
strm->avail_out = left; \
strm->next_in = next; \
strm->avail_in = have; \
state->hold = hold; \
state->bits = bits; \
} while (0)

◆ UPDATE

#define UPDATE ( check,
buf,
len )
Value:
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
Definition adler32.c:134
char buf[N_BUF]
Definition spewG.c:36
static uint32_t const uint8_t uint32_t len
Definition memcmplen.h:44

Function Documentation

◆ fixedtables()

local void fixedtables ( struct inflate_state FAR * state)

◆ inflate()

int ZEXPORT inflate ( z_streamp strm,
int flush )

◆ inflateCodesUsed()

unsigned long ZEXPORT inflateCodesUsed ( z_streamp strm)

◆ inflateCopy()

int ZEXPORT inflateCopy ( z_streamp dest,
z_streamp source )

◆ inflateEnd()

int ZEXPORT inflateEnd ( z_streamp strm)

◆ inflateGetDictionary()

int ZEXPORT inflateGetDictionary ( z_streamp strm,
Bytef * dictionary,
uInt * dictLength )

◆ inflateGetHeader()

int ZEXPORT inflateGetHeader ( z_streamp strm,
gz_headerp head )

◆ inflateInit2_()

int ZEXPORT inflateInit2_ ( z_streamp strm,
int windowBits,
const char * version,
int stream_size )

◆ inflateInit_()

int ZEXPORT inflateInit_ ( z_streamp strm,
const char * version,
int stream_size )

◆ inflateMark()

long ZEXPORT inflateMark ( z_streamp strm)

◆ inflatePrime()

int ZEXPORT inflatePrime ( z_streamp strm,
int bits,
int value )

◆ inflateReset()

int ZEXPORT inflateReset ( z_streamp strm)

◆ inflateReset2()

int ZEXPORT inflateReset2 ( z_streamp strm,
int windowBits )

◆ inflateResetKeep()

int ZEXPORT inflateResetKeep ( z_streamp strm)

◆ inflateSetDictionary()

int ZEXPORT inflateSetDictionary ( z_streamp strm,
const Bytef * dictionary,
uInt dictLength )

◆ inflateStateCheck()

local int inflateStateCheck ( z_streamp strm)

◆ inflateSync()

int ZEXPORT inflateSync ( z_streamp strm)

◆ inflateSyncPoint()

int ZEXPORT inflateSyncPoint ( z_streamp strm)

◆ inflateUndermine()

int ZEXPORT inflateUndermine ( z_streamp strm,
int subvert )

◆ inflateValidate()

int ZEXPORT inflateValidate ( z_streamp strm,
int check )

◆ OF() [1/4]

local void fixedtables OF ( (struct inflate_state FAR *state) )

◆ OF() [2/4]

local unsigned syncsearch OF ( (unsigned FAR *have, const unsigned char FAR *buf, unsigned len) )

◆ OF() [3/4]

◆ OF() [4/4]

local int updatewindow OF ( (z_streamp strm, const unsigned char FAR *end, unsigned copy) )

◆ syncsearch()

local unsigned syncsearch ( unsigned FAR * have,
const unsigned char FAR * buf,
unsigned len )

◆ updatewindow()

local int updatewindow ( z_streamp strm,
const Bytef * end,
unsigned copy )