TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
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(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 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

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

Definition at line 491 of file inflate.c.

Referenced by inflate().

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

Definition at line 502 of file inflate.c.

Referenced by inflate().

#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:1015

Definition at line 426 of file inflate.c.

Referenced by inflate().

#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:1015

Definition at line 433 of file inflate.c.

Referenced by inflate().

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

Definition at line 495 of file inflate.c.

Referenced by inflate().

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

Definition at line 466 of file inflate.c.

Referenced by inflate().

#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)
state
Definition: http_parser.c:279

Definition at line 444 of file inflate.c.

Referenced by inflate().

#define NEEDBITS (   n)
Value:
do { \
while (bits < (unsigned)(n)) \
} while (0)
#define PULLBYTE()
Definition: inflate.c:474

Definition at line 484 of file inflate.c.

Referenced by inflate().

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

Definition at line 474 of file inflate.c.

Referenced by inflate().

#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)
state
Definition: http_parser.c:279

Definition at line 455 of file inflate.c.

Referenced by inflate().

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

Definition at line 418 of file inflate.c.

Referenced by inflate().

Function Documentation

local void fixedtables ( struct inflate_state FAR state)

Definition at line 252 of file inflate.c.

References inflate_state::bits, distfix, DISTS, inflate_table(), lenfix, LENS, and inflate_state::next.

Referenced by inflate().

int ZEXPORT inflate ( z_streamp  strm,
int  flush 
)

Definition at line 590 of file inflate.c.

References adler32(), inflate_state::back, BAD, code::bits, inflate_state::bits, BITS, BYTEBITS, CHECK, inflate_state::check, CODELENS, CODES, inflate_state::codes, COMMENT, COPY, COPY_, CRC2, crc32(), CRC4, DICT, DICTID, DIST, inflate_state::distbits, inflate_state::distcode, DISTEXT, DISTS, inflate_state::dmax, DONE, DROPBITS, EXLEN, EXTRA, inflate_state::extra, fixedtables(), FLAGS, inflate_state::flags, GUNZIP, inflate_state::have, inflate_state::havedict, HCRC, HEAD, inflate_state::head, inflate_state::hold, inflate_fast(), inflate_table(), inflateStateCheck(), INITBITS, int(), inflate_state::last, LEN, LEN_, inflate_state::lenbits, inflate_state::lencode, LENEXT, LENGTH, inflate_state::length, LENLENS, LENS, inflate_state::lens, LIT, LOAD, MATCH, MEM, inflate_state::mode, NAME, inflate_state::ncode, inflate_state::ndist, NEEDBITS, inflate_state::next, inflate_state::nlen, inflate_state::offset, code::op, OS, PULLBYTE, RESTORE, inflate_state::sane, STORED, SYNC, TABLE, TIME, inflate_state::total, Trace, Tracev, Tracevv, TYPE, TYPEDO, UPDATE_CHECK, updatewindow(), code::val, inflate_state::was, inflate_state::wbits, inflate_state::whave, inflate_state::window, inflate_state::wnext, inflate_state::work, inflate_state::wrap, inflate_state::wsize, Z_BLOCK, Z_BUF_ERROR, z_const, Z_DATA_ERROR, Z_DEFLATED, Z_FINISH, Z_MEM_ERROR, Z_NEED_DICT, Z_NULL, Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_TREES, zmemcpy(), and ZSWAP32.

Referenced by gz_decomp(), uncompress2(), and unzReadCurrentFile().

unsigned long ZEXPORT inflateCodesUsed ( z_streamp  strm)

Definition at line 1521 of file inflate.c.

References inflate_state::codes, inflateStateCheck(), and inflate_state::next.

int ZEXPORT inflateCopy ( z_streamp  dest,
z_streamp  source 
)
int ZEXPORT inflateEnd ( z_streamp  strm)
int ZEXPORT inflateGetDictionary ( z_streamp  strm,
Bytef dictionary,
uInt dictLength 
)
int ZEXPORT inflateGetHeader ( z_streamp  strm,
gz_headerp  head 
)
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 
)

Definition at line 218 of file inflate.c.

References DEF_WBITS, and inflateInit2_().

long ZEXPORT inflateMark ( z_streamp  strm)
int ZEXPORT inflatePrime ( z_streamp  strm,
int  bits,
int  value 
)
int ZEXPORT inflateReset ( z_streamp  strm)
int ZEXPORT inflateReset2 ( z_streamp  strm,
int  windowBits 
)
int ZEXPORT inflateResetKeep ( z_streamp  strm)
int ZEXPORT inflateSetDictionary ( z_streamp  strm,
const Bytef dictionary,
uInt  dictLength 
)
local int inflateStateCheck ( z_streamp  strm)
int ZEXPORT inflateSync ( z_streamp  strm)
int ZEXPORT inflateSyncPoint ( z_streamp  strm)
int ZEXPORT inflateUndermine ( z_streamp  strm,
int  subvert 
)

Definition at line 1483 of file inflate.c.

References inflateStateCheck(), inflate_state::sane, Z_DATA_ERROR, Z_OK, and Z_STREAM_ERROR.

int ZEXPORT inflateValidate ( z_streamp  strm,
int  check 
)

Definition at line 1498 of file inflate.c.

References inflateStateCheck(), inflate_state::wrap, Z_OK, and Z_STREAM_ERROR.

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

Definition at line 1355 of file inflate.c.

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

Referenced by inflateSync().

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