XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
miniz_tinfl.c File Reference
#include "miniz.h"
Include dependency graph for miniz_tinfl.c:

Macros

#define TINFL_MEMCPY(d, s, l)   memcpy(d, s, l)
 
#define TINFL_MEMSET(p, c, l)   memset(p, c, l)
 
#define TINFL_CR_BEGIN
 
#define TINFL_CR_RETURN(state_index, result)
 
#define TINFL_CR_RETURN_FOREVER(state_index, result)
 
#define TINFL_CR_FINISH   }
 
#define TINFL_GET_BYTE(state_index, c)
 
#define TINFL_NEED_BITS(state_index, n)
 
#define TINFL_SKIP_BITS(state_index, n)
 
#define TINFL_GET_BITS(state_index, b, n)
 
#define TINFL_HUFF_BITBUF_FILL(state_index, pLookUp, pTree)
 
#define TINFL_HUFF_DECODE(state_index, sym, pLookUp, pTree)
 

Functions

tinfl_status tinfl_decompress (tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
 
void * tinfl_decompress_mem_to_heap (const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
 
size_t tinfl_decompress_mem_to_mem (void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
 
int tinfl_decompress_mem_to_callback (const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
 
tinfl_decompressor * tinfl_decompressor_alloc (void)
 
void tinfl_decompressor_free (tinfl_decompressor *pDecomp)
 

Macro Definition Documentation

◆ TINFL_CR_BEGIN

#define TINFL_CR_BEGIN
Value:
switch (r->m_state) \
{ \
case 0:

◆ TINFL_CR_FINISH

#define TINFL_CR_FINISH   }

◆ TINFL_CR_RETURN

#define TINFL_CR_RETURN (   state_index,
  result 
)
Value:
do \
{ \
status = result; \
r->m_state = state_index; \
goto common_exit; \
case state_index:; \
} \
#define MZ_MACRO_END
Definition miniz_common.h:26

◆ TINFL_CR_RETURN_FOREVER

#define TINFL_CR_RETURN_FOREVER (   state_index,
  result 
)
Value:
do \
{ \
for (;;) \
{ \
TINFL_CR_RETURN(state_index, result); \
} \
} \

◆ TINFL_GET_BITS

#define TINFL_GET_BITS (   state_index,
  b,
  n 
)
Value:
do \
{ \
if (num_bits < (mz_uint)(n)) \
{ \
TINFL_NEED_BITS(state_index, n); \
} \
b = bit_buf & ((1 << (n)) - 1); \
bit_buf >>= (n); \
num_bits -= (n); \
} \
size_t b
Definition main.cpp:156
unsigned int mz_uint
Definition miniz_common.h:14

◆ TINFL_GET_BYTE

#define TINFL_GET_BYTE (   state_index,
  c 
)
Value:
do \
{ \
while (pIn_buf_cur >= pIn_buf_end) \
{ \
} \
c = *pIn_buf_cur++; \
} \
@ TINFL_STATUS_NEEDS_MORE_INPUT
Definition miniz_tinfl.h:82
@ TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS
Definition miniz_tinfl.h:62
@ TINFL_FLAG_HAS_MORE_INPUT
Definition miniz_tinfl.h:18

◆ TINFL_HUFF_BITBUF_FILL

#define TINFL_HUFF_BITBUF_FILL (   state_index,
  pLookUp,
  pTree 
)
Value:
do \
{ \
temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \
if (temp >= 0) \
{ \
code_len = temp >> 9; \
if ((code_len) && (num_bits >= code_len)) \
break; \
} \
else if (num_bits > TINFL_FAST_LOOKUP_BITS) \
{ \
code_len = TINFL_FAST_LOOKUP_BITS; \
do \
{ \
temp = pTree[~temp + ((bit_buf >> code_len++) & 1)]; \
} while ((temp < 0) && (num_bits >= (code_len + 1))); \
if (temp >= 0) \
break; \
} \
TINFL_GET_BYTE(state_index, c); \
bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \
num_bits += 8; \
} while (num_bits < 15);
@ TINFL_FAST_LOOKUP_SIZE
Definition miniz_tinfl.h:112
@ TINFL_FAST_LOOKUP_BITS
Definition miniz_tinfl.h:111
mz_uint32 tinfl_bit_buf_t
Definition miniz_tinfl.h:125

◆ TINFL_HUFF_DECODE

#define TINFL_HUFF_DECODE (   state_index,
  sym,
  pLookUp,
  pTree 
)

◆ TINFL_MEMCPY

#define TINFL_MEMCPY (   d,
  s,
  l 
)    memcpy(d, s, l)

◆ TINFL_MEMSET

#define TINFL_MEMSET (   p,
  c,
  l 
)    memset(p, c, l)

◆ TINFL_NEED_BITS

#define TINFL_NEED_BITS (   state_index,
  n 
)
Value:
do \
{ \
mz_uint c; \
TINFL_GET_BYTE(state_index, c); \
bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \
num_bits += 8; \
} while (num_bits < (mz_uint)(n))

◆ TINFL_SKIP_BITS

#define TINFL_SKIP_BITS (   state_index,
  n 
)
Value:
do \
{ \
if (num_bits < (mz_uint)(n)) \
{ \
TINFL_NEED_BITS(state_index, n); \
} \
bit_buf >>= (n); \
num_bits -= (n); \
} \

Function Documentation

◆ tinfl_decompress()

tinfl_status tinfl_decompress ( tinfl_decompressor *  r,
const mz_uint8 *  pIn_buf_next,
size_t *  pIn_buf_size,
mz_uint8 *  pOut_buf_start,
mz_uint8 *  pOut_buf_next,
size_t *  pOut_buf_size,
const mz_uint32  decomp_flags 
)

◆ tinfl_decompress_mem_to_callback()

int tinfl_decompress_mem_to_callback ( const void *  pIn_buf,
size_t *  pIn_buf_size,
tinfl_put_buf_func_ptr  pPut_buf_func,
void *  pPut_buf_user,
int  flags 
)

◆ tinfl_decompress_mem_to_heap()

void * tinfl_decompress_mem_to_heap ( const void *  pSrc_buf,
size_t  src_buf_len,
size_t *  pOut_len,
int  flags 
)

◆ tinfl_decompress_mem_to_mem()

size_t tinfl_decompress_mem_to_mem ( void *  pOut_buf,
size_t  out_buf_len,
const void *  pSrc_buf,
size_t  src_buf_len,
int  flags 
)

◆ tinfl_decompressor_alloc()

tinfl_decompressor * tinfl_decompressor_alloc ( void  )

◆ tinfl_decompressor_free()

void tinfl_decompressor_free ( tinfl_decompressor *  pDecomp)