RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
deflate.c File Reference
#include "deflate.h"
Include dependency graph for deflate.c:

Classes

struct  config_s
 

Macros

#define NIL   0
 
#define TOO_FAR   4096
 
#define EQUAL   0
 
#define RANK(f)   (((f) << 1) - ((f) > 4 ? 9 : 0))
 
#define UPDATE_HASH(s, h, c)   (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
 
#define INSERT_STRING(s, str, match_head)
 
#define CLEAR_HASH(s)
 
#define check_match(s, start, match, length)
 
#define FLUSH_BLOCK_ONLY(s, last)
 
#define FLUSH_BLOCK(s, last)
 

Typedefs

typedef block_state(* compress_func) (deflate_state *s, int flush)
 
typedef struct config_s config
 

Enumerations

enum  block_state { need_more, block_done, finish_started, finish_done }
 

Functions

static void fill_window (deflate_state *s)
 
static block_state deflate_stored (deflate_state *s, int flush)
 
static block_state deflate_fast (deflate_state *s, int flush)
 
static block_state deflate_slow (deflate_state *s, int flush)
 
static block_state deflate_rle (deflate_state *s, int flush)
 
static block_state deflate_huff (deflate_state *s, int flush)
 
static void lm_init (deflate_state *s)
 
static void putShortMSB (deflate_state *s, uInt b)
 
static void flush_pending (z_streamp strm)
 
static int read_buf (z_streamp strm, Bytef *buf, unsigned size)
 
static uInt longest_match (deflate_state *s, IPos cur_match)
 
int deflateResetKeep (z_streamp strm)
 
int deflatePending (z_streamp strm, unsigned *pending, int *bits)
 
int deflateInit_ (z_streamp strm, int level, const char *version, int stream_size)
 
int deflateInit2_ (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)
 
int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength)
 
int deflateReset (z_streamp strm)
 
int deflateSetHeader (z_streamp strm, gz_headerp head)
 
int deflatePrime (z_streamp strm, int bits, int value)
 
int deflateParams (z_streamp strm, int level, int strategy)
 
int deflateTune (z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain)
 
uLong deflateBound (z_streamp strm, uLong sourceLen)
 
int deflate (z_streamp strm, int flush)
 
int deflateEnd (z_streamp strm)
 
int deflateCopy (z_streamp dest, z_streamp source)
 

Variables

const char deflate_copyright []
 
static const config configuration_table [10]
 

Macro Definition Documentation

◆ check_match

#define check_match (   s,
  start,
  match,
  length 
)

◆ CLEAR_HASH

#define CLEAR_HASH (   s)
Value:
s->head[s->hash_size-1] = NIL; \
zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
Byte FAR Bytef
Definition: zconf.h:340
GLdouble s
Definition: glext.h:6390
#define NIL
Definition: deflate.c:107

◆ EQUAL

#define EQUAL   0

◆ FLUSH_BLOCK

#define FLUSH_BLOCK (   s,
  last 
)
Value:
{ \
FLUSH_BLOCK_ONLY(s, last); \
if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
}
return
Definition: irq.c:321
Definition: deflate.c:70
GLdouble s
Definition: glext.h:6390
Definition: deflate.c:72

◆ FLUSH_BLOCK_ONLY

#define FLUSH_BLOCK_ONLY (   s,
  last 
)
Value:
{ \
_tr_flush_block(s, (s->block_start >= 0L ? \
(charf *)&s->window[(unsigned)s->block_start] : \
(charf *)Z_NULL), \
(ulg)((long)s->strstart - s->block_start), \
(last)); \
s->block_start = s->strstart; \
flush_pending(s->strm); \
Tracev((stderr,"[FLUSH]")); \
}
char FAR charf
Definition: zconf.h:342
GLdouble s
Definition: glext.h:6390
Ιστορικό Εικόνα Πληροφορίες Όλοι Οι Χρήστες Χειρίζονται Το Μενού Αριστερό Αναλογικό Αριστερό Αναλογικό Αριστερό Αναλογικό Y Αριστερό Αναλογικό Δεξί Αναλογικό X Δεξί Αναλογικό Δεξί Αναλογικό Y Δεξί Αναλογικό Σκανδάλη Όπλου Όπλο Aux A Όπλο Aux C Όπλο Select Όπλο D pad Κάτω Όπλο D pad Δεξιά Νεκρή Ζώνη Αναλογικού Σύνδεση Όλων Λήξη Χρόνου Σύνδεσης Hide Unbound Core Input Descriptors Κατάλογος Συσκευών Κατάλογος Ποντικιού Duty Cycle Keyboard Gamepad Mapping Enable Κουμπί D pad κάτω Κουμπί Κουμπί L(πίσω)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT

◆ INSERT_STRING

#define INSERT_STRING (   s,
  str,
  match_head 
)
Value:
(UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
s->head[s->ins_h] = (Pos)(str))
GLdouble s
Definition: glext.h:6390
ush Pos
Definition: deflate.h:89
#define UPDATE_HASH(s, h, c)
Definition: deflate.c:166
const char *const str
Definition: portlistingparse.c:18

◆ NIL

#define NIL   0

◆ RANK

#define RANK (   f)    (((f) << 1) - ((f) > 4 ? 9 : 0))

◆ TOO_FAR

#define TOO_FAR   4096

◆ UPDATE_HASH

#define UPDATE_HASH (   s,
  h,
  c 
)    (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)

Typedef Documentation

◆ compress_func

typedef block_state(* compress_func) (deflate_state *s, int flush)

◆ config

typedef struct config_s config

Enumeration Type Documentation

◆ block_state

Enumerator
need_more 
block_done 
finish_started 
finish_done 

Function Documentation

◆ deflate()

int deflate ( z_streamp  strm,
int  flush 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflate_fast()

static block_state deflate_fast ( deflate_state s,
int  flush 
)
static
Here is the call graph for this function:

◆ deflate_huff()

static block_state deflate_huff ( deflate_state s,
int  flush 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflate_rle()

static block_state deflate_rle ( deflate_state s,
int  flush 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflate_slow()

static block_state deflate_slow ( deflate_state s,
int  flush 
)
static
Here is the call graph for this function:

◆ deflate_stored()

static block_state deflate_stored ( deflate_state s,
int  flush 
)
static
Here is the call graph for this function:

◆ deflateBound()

uLong deflateBound ( z_streamp  strm,
uLong  sourceLen 
)

◆ deflateCopy()

int deflateCopy ( z_streamp  dest,
z_streamp  source 
)
Here is the call graph for this function:

◆ deflateEnd()

int deflateEnd ( z_streamp  strm)
Here is the caller graph for this function:

◆ deflateInit2_()

int deflateInit2_ ( z_streamp  strm,
int  level,
int  method,
int  windowBits,
int  memLevel,
int  strategy,
const char *  version,
int  stream_size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflateInit_()

int deflateInit_ ( z_streamp  strm,
int  level,
const char *  version,
int  stream_size 
)
Here is the call graph for this function:

◆ deflateParams()

int deflateParams ( z_streamp  strm,
int  level,
int  strategy 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflatePending()

int deflatePending ( z_streamp  strm,
unsigned *  pending,
int *  bits 
)

◆ deflatePrime()

int deflatePrime ( z_streamp  strm,
int  bits,
int  value 
)
Here is the call graph for this function:

◆ deflateReset()

int deflateReset ( z_streamp  strm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflateResetKeep()

int deflateResetKeep ( z_streamp  strm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deflateSetDictionary()

int deflateSetDictionary ( z_streamp  strm,
const Bytef dictionary,
uInt  dictLength 
)
Here is the call graph for this function:

◆ deflateSetHeader()

int deflateSetHeader ( z_streamp  strm,
gz_headerp  head 
)

◆ deflateTune()

int deflateTune ( z_streamp  strm,
int  good_length,
int  max_lazy,
int  nice_length,
int  max_chain 
)

◆ fill_window()

static void fill_window ( deflate_state s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush_pending()

static void flush_pending ( z_streamp  strm)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lm_init()

static void lm_init ( deflate_state s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ longest_match()

static uInt longest_match ( deflate_state s,
IPos  cur_match 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ putShortMSB()

static void putShortMSB ( deflate_state s,
uInt  b 
)
static
Here is the caller graph for this function:

◆ read_buf()

static int read_buf ( z_streamp  strm,
Bytef buf,
unsigned  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ configuration_table

const config configuration_table[10]
static
Initial value:
= {
{0, 0, 0, 0, deflate_stored},
{4, 4, 8, 4, deflate_fast},
{4, 5, 16, 8, deflate_fast},
{4, 6, 32, 32, deflate_fast},
{4, 4, 16, 16, deflate_slow},
{8, 16, 32, 32, deflate_slow},
{8, 16, 128, 128, deflate_slow},
{8, 32, 128, 256, deflate_slow},
{32, 128, 258, 1024, deflate_slow},
{32, 258, 258, 4096, deflate_slow}}
static block_state deflate_stored(deflate_state *s, int flush)
Definition: deflate.c:1518
static block_state deflate_fast(deflate_state *s, int flush)
Definition: deflate.c:1580
static block_state deflate_slow(deflate_state *s, int flush)
Definition: deflate.c:1680

◆ deflate_copyright

const char deflate_copyright[]
Initial value:
=
" deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "