Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
inflate.c File Reference
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#include "inffixed.h"

Go to the source code of this file.

Macros

#define UPDATE(check, buf, len)   (state->flags ? crc32(check, buf, len) : adler32(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)   ((unsigned)hold & ((1U << (n)) - 1))
 
#define DROPBITS(n)
 
#define BYTEBITS()
 

Functions

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))
 
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)
 
long ZEXPORT inflateMark (z_streamp strm)
 

Macro Definition Documentation

◆ BITS

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

Definition at line 506 of file inflate.c.

Referenced by inflate().

◆ BYTEBITS

#define BYTEBITS ( )
Value:
do { \
hold >>= bits & 7; \
bits -= bits & 7; \
} while (0)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits

Definition at line 517 of file inflate.c.

Referenced by inflate().

◆ 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:204

Definition at line 441 of file inflate.c.

Referenced by inflate().

◆ 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)
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uInt len)
Definition: crc32.c:204

Definition at line 448 of file inflate.c.

Referenced by inflate().

◆ DROPBITS

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

Definition at line 510 of file inflate.c.

Referenced by inflate().

◆ INITBITS

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

Definition at line 481 of file inflate.c.

Referenced by inflate().

◆ 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)

Definition at line 459 of file inflate.c.

Referenced by inflate().

◆ NEEDBITS

#define NEEDBITS (   n)
Value:
do { \
while (bits < (unsigned)(n)) \
PULLBYTE(); \
} while (0)
GLdouble n
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits

Definition at line 499 of file inflate.c.

Referenced by inflate().

◆ PULLBYTE

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

Definition at line 489 of file inflate.c.

Referenced by inflate().

◆ 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)
#define bits
Definition: infblock.c:15
GLint left

Definition at line 470 of file inflate.c.

Referenced by inflate().

◆ UPDATE

#define UPDATE (   check,
  buf,
  len 
)    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))

Definition at line 433 of file inflate.c.

Referenced by inflate().

Function Documentation

◆ fixedtables()

local void fixedtables ( struct inflate_state FAR state)

Definition at line 261 of file inflate.c.

Referenced by inflate().

◆ inflate()

int ZEXPORT inflate ( z_streamp  strm,
int  flush 
)

◆ inflateCopy()

int ZEXPORT inflateCopy ( z_streamp  dest,
z_streamp  source 
)

Definition at line 1438 of file inflate.c.

Referenced by cover_wrap(), and inf().

◆ inflateEnd()

int ZEXPORT inflateEnd ( z_streamp  strm)

Definition at line 1254 of file inflate.c.

References if(), Tracev, inflate_state::window, Z_NULL, Z_OK, Z_STREAM_ERROR, and ZFREE.

Referenced by ZEXPORT().

◆ inflateGetDictionary()

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

◆ inflateGetHeader()

int ZEXPORT inflateGetHeader ( z_streamp  strm,
gz_headerp  head 
)

Definition at line 1326 of file inflate.c.

References inflate_state::head, if(), inflate_state::wrap, Z_NULL, Z_OK, and Z_STREAM_ERROR.

Referenced by inf().

◆ 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 
)

Definition at line 222 of file inflate.c.

References DEF_WBITS, and inflateInit2_().

◆ inflateMark()

long ZEXPORT inflateMark ( z_streamp  strm)

◆ inflatePrime()

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

Definition at line 230 of file inflate.c.

References bits, inflate_state::bits, inflate_state::hold, if(), Z_NULL, Z_OK, and Z_STREAM_ERROR.

Referenced by cover_support(), cover_wrap(), and extract().

◆ 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 
)

◆ inflateSync()

int ZEXPORT inflateSync ( z_streamp  strm)

◆ inflateSyncPoint()

int ZEXPORT inflateSyncPoint ( z_streamp  strm)

Definition at line 1428 of file inflate.c.

References inflate_state::bits, inflate_state::mode, STORED, Z_NULL, and Z_STREAM_ERROR.

Referenced by cover_wrap().

◆ inflateUndermine()

int ZEXPORT inflateUndermine ( z_streamp  strm,
int  subvert 
)

Definition at line 1485 of file inflate.c.

References inflate_state::sane, Z_DATA_ERROR, Z_NULL, Z_OK, and Z_STREAM_ERROR.

Referenced by cover_wrap().

◆ OF() [1/3]

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

◆ OF() [2/3]

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

◆ OF() [3/3]

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

◆ syncsearch()

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

Definition at line 1354 of file inflate.c.

References inflate_state::have, and inflate_state::next.

Referenced by inflateSync().

◆ updatewindow()

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