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

Go to the source code of this file.

Classes

struct  config_s
 
struct  static_tree_desc_s
 

Macros

#define check_match(s, start, match, length)
 
#define CLEAR_HASH(s)
 
#define EQUAL   0
 
#define FLUSH_BLOCK(s, eof)
 
#define FLUSH_BLOCK_ONLY(s, eof)
 
#define INSERT_STRING(s, str, match_head)
 
#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)
 
#define NIL   0
 
#define TOO_FAR   4096
 
#define UPDATE_HASH(s, h, c)   (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
 

Typedefs

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

Enumerations

enum  block_state { need_more, block_done, finish_started, finish_done }
 

Functions

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

Variables

const config configuration_table [10]
 
const char deflate_copyright []
 

Macro Definition Documentation

◆ check_match

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

Definition at line 1253 of file deflate.c.

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

Definition at line 199 of file deflate.c.

◆ EQUAL

#define EQUAL   0

Definition at line 157 of file deflate.c.

◆ FLUSH_BLOCK

#define FLUSH_BLOCK (   s,
  eof 
)
Value:
{ \
FLUSH_BLOCK_ONLY(s, eof); \
if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
}

Definition at line 1376 of file deflate.c.

◆ FLUSH_BLOCK_ONLY

#define FLUSH_BLOCK_ONLY (   s,
  eof 
)
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), \
(eof)); \
s->block_start = s->strstart; \
flush_pending(s->strm); \
Tracev((stderr,"[FLUSH]")); \
}

Definition at line 1364 of file deflate.c.

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

Definition at line 189 of file deflate.c.

◆ MIN_LOOKAHEAD

#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)

Definition at line 113 of file deflate.c.

◆ NIL

#define NIL   0

Definition at line 105 of file deflate.c.

◆ TOO_FAR

#define TOO_FAR   4096

Definition at line 109 of file deflate.c.

◆ UPDATE_HASH

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

Definition at line 170 of file deflate.c.

Typedef Documentation

◆ config

typedef struct config_s config

◆ OF

Definition at line 73 of file deflate.c.

Enumeration Type Documentation

◆ block_state

Enumerator
need_more 
block_done 
finish_started 
finish_done 

Definition at line 66 of file deflate.c.

Function Documentation

◆ deflate()

int ZEXPORT deflate ( z_streamp  strm,
int  flush 
)

Definition at line 552 of file deflate.c.

◆ deflate_fast()

block_state deflate_fast ( deflate_state s,
int  flush 
)

Definition at line 1448 of file deflate.c.

◆ deflate_slow()

block_state deflate_slow ( deflate_state s,
int  flush 
)

Definition at line 1554 of file deflate.c.

◆ deflate_stored()

block_state deflate_stored ( deflate_state s,
int  flush 
)

Definition at line 1390 of file deflate.c.

◆ deflateBound()

uLong ZEXPORT deflateBound ( z_streamp  strm,
uLong  sourceLen 
)

Definition at line 489 of file deflate.c.

◆ deflateCopy()

int ZEXPORT deflateCopy ( z_streamp  dest,
z_streamp  source 
)

Definition at line 894 of file deflate.c.

◆ deflateEnd()

int ZEXPORT deflateEnd ( z_streamp  strm)

Definition at line 859 of file deflate.c.

◆ deflateInit2_()

int ZEXPORT deflateInit2_ ( z_streamp  strm,
int  level,
int  method,
int  windowBits,
int  memLevel,
int  strategy,
const char *  version,
int  stream_size 
)

Definition at line 216 of file deflate.c.

◆ deflateInit_()

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

Definition at line 204 of file deflate.c.

◆ deflateParams()

int ZEXPORT deflateParams ( z_streamp  strm,
int  level,
int  strategy 
)

Definition at line 416 of file deflate.c.

◆ deflatePrime()

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

Definition at line 404 of file deflate.c.

◆ deflateReset()

int ZEXPORT deflateReset ( z_streamp  strm)

Definition at line 357 of file deflate.c.

◆ deflateSetDictionary()

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

Definition at line 315 of file deflate.c.

◆ deflateSetHeader()

int ZEXPORT deflateSetHeader ( z_streamp  strm,
gz_headerp  head 
)

Definition at line 393 of file deflate.c.

◆ deflateTune()

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

Definition at line 454 of file deflate.c.

◆ fill_window()

void fill_window ( deflate_state s)

Definition at line 1266 of file deflate.c.

◆ flush_pending()

void flush_pending ( z_streamp  strm)

Definition at line 532 of file deflate.c.

◆ lm_init()

void lm_init ( deflate_state s)

Definition at line 986 of file deflate.c.

◆ longest_match()

uInt longest_match ( deflate_state s,
IPos  cur_match 
)

Definition at line 1027 of file deflate.c.

◆ longest_match_fast()

uInt longest_match_fast ( deflate_state s,
IPos  cur_match 
)

Definition at line 1175 of file deflate.c.

◆ OF() [1/6]

◆ OF() [2/6]

◆ OF() [3/6]

uInt longest_match OF ( (deflate_state *s, IPos cur_match)  )

◆ OF() [4/6]

◆ OF() [5/6]

void flush_pending OF ( (z_streamp strm)  )

◆ OF() [6/6]

int read_buf OF ( (z_streamp strm, Bytef *buf, unsigned size )

◆ putShortMSB()

void putShortMSB ( deflate_state s,
uInt  b 
)

Definition at line 518 of file deflate.c.

◆ read_buf()

int read_buf ( z_streamp  strm,
Bytef buf,
unsigned  size 
)

Definition at line 956 of file deflate.c.

Variable Documentation

◆ configuration_table

const config configuration_table[10]
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}}

Definition at line 137 of file deflate.c.

◆ deflate_copyright

const char deflate_copyright[]
Initial value:
=
" deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "

Definition at line 54 of file deflate.c.

Bytef
Byte FAR Bytef
Definition: zconf.h:270
deflate_fast
block_state deflate_fast(deflate_state *s, int flush)
Definition: deflate.c:1448
deflate_slow
block_state deflate_slow(deflate_state *s, int flush)
Definition: deflate.c:1554
Pos
ush Pos
Definition: deflate.h:86
charf
char FAR charf
Definition: zconf.h:272
UPDATE_HASH
#define UPDATE_HASH(s, h, c)
Definition: deflate.c:170
finish_started
@ finish_started
Definition: deflate.c:69
Z_NULL
#define Z_NULL
Definition: zlib.h:205
NIL
#define NIL
Definition: deflate.c:105
deflate_stored
block_state deflate_stored(deflate_state *s, int flush)
Definition: deflate.c:1390
MIN_MATCH
#define MIN_MATCH
Definition: zutil.h:81
need_more
@ need_more
Definition: deflate.c:67
ulg
unsigned long ulg
Definition: zutil.h:51


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04