Geant4  10.00.p01
inflate.cc File Reference
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#include "inffixed.h"
+ Include dependency graph for inflate.cc:

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, unsigned out))
 
local unsigned syncsearch OF ((unsigned FAR *have, 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, unsigned out)
 
int ZEXPORT inflate (z_streamp strm, int flush)
 
int ZEXPORT inflateEnd (z_streamp strm)
 
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, 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

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

Definition at line 488 of file inflate.cc.

Referenced by inflate().

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

Definition at line 499 of file inflate.cc.

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.cc:202

Definition at line 423 of file inflate.cc.

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.cc:202

Definition at line 430 of file inflate.cc.

Referenced by inflate().

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

Definition at line 492 of file inflate.cc.

Referenced by inflate().

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

Definition at line 463 of file inflate.cc.

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)

Definition at line 441 of file inflate.cc.

Referenced by inflate().

#define NEEDBITS (   n)
Value:
do { \
while (bits < (unsigned)(n)) \
} while (0)
const G4int n
#define PULLBYTE()
Definition: inflate.cc:471

Definition at line 481 of file inflate.cc.

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 471 of file inflate.cc.

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)

Definition at line 452 of file inflate.cc.

Referenced by inflate().

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

Definition at line 415 of file inflate.cc.

Referenced by inflate().

Function Documentation

local void fixedtables ( struct inflate_state FAR *  state)

Definition at line 246 of file inflate.cc.

References inflate_table().

Referenced by inflate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ZEXPORT inflate ( z_streamp  strm,
int  flush 
)

Definition at line 587 of file inflate.cc.

References adler32(), BITS, BYTEBITS, copy(), CRC2, crc32(), CRC4, DROPBITS, fixedtables(), inflate_fast(), inflate_table(), INITBITS, L, left, LOAD, NEEDBITS, PULLBYTE, RESTORE, UPDATE, updatewindow(), and zmemcpy().

Referenced by gz_decomp(), and uncompress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ZEXPORT inflateCopy ( z_streamp  dest,
z_streamp  source 
)

Definition at line 1392 of file inflate.cc.

References copy(), and zmemcpy().

+ Here is the call graph for this function:

int ZEXPORT inflateEnd ( z_streamp  strm)

Definition at line 1234 of file inflate.cc.

Referenced by gzclose_r(), and uncompress().

+ Here is the caller graph for this function:

int ZEXPORT inflateGetHeader ( z_streamp  strm,
gz_headerp  head 
)

Definition at line 1287 of file inflate.cc.

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

Definition at line 175 of file inflate.cc.

References inflateReset2(), zcalloc(), and zcfree().

Referenced by inflateInit_().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 213 of file inflate.cc.

References inflateInit2_().

+ Here is the call graph for this function:

long ZEXPORT inflateMark ( z_streamp  strm)

Definition at line 1452 of file inflate.cc.

References L.

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

Definition at line 218 of file inflate.cc.

References L.

int ZEXPORT inflateReset ( z_streamp  strm)

Definition at line 127 of file inflate.cc.

References inflateResetKeep().

Referenced by gz_look(), inflateReset2(), and inflateSync().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ZEXPORT inflateReset2 ( z_streamp  strm,
int  windowBits 
)

Definition at line 139 of file inflate.cc.

References inflateReset(), and G4INCL::String::wrap().

Referenced by inflateInit2_().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ZEXPORT inflateResetKeep ( z_streamp  strm)

Definition at line 103 of file inflate.cc.

Referenced by inflateReset().

+ Here is the caller graph for this function:

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

Definition at line 1247 of file inflate.cc.

References adler32(), L, and updatewindow().

+ Here is the call graph for this function:

int ZEXPORT inflateSync ( z_streamp  strm)

Definition at line 1333 of file inflate.cc.

References inflateReset(), and syncsearch().

+ Here is the call graph for this function:

int ZEXPORT inflateSyncPoint ( z_streamp  strm)

Definition at line 1383 of file inflate.cc.

int ZEXPORT inflateUndermine ( z_streamp  strm,
int  subvert 
)

Definition at line 1437 of file inflate.cc.

local void fixedtables OF ( (struct inflate_state FAR *state)  )
local int updatewindow OF ( (z_streamp strm, unsigned out)  )
local unsigned syncsearch OF ( (unsigned FAR *have, unsigned char FAR *buf, unsigned len)  )
local unsigned syncsearch ( unsigned FAR *  have,
unsigned char FAR *  buf,
unsigned  len 
)

Definition at line 1313 of file inflate.cc.

Referenced by inflateSync().

+ Here is the caller graph for this function:

local int updatewindow ( z_streamp  strm,
unsigned  out 
)

Definition at line 363 of file inflate.cc.

References copy(), and zmemcpy().

Referenced by inflate(), and inflateSetDictionary().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: