Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deflate.c File Reference

`#include "deflate.h"`

Include dependency graph for deflate.c:

## Compounds
struct | config_s
struct | static_tree_desc_s
## Defines
#define | NIL 0
#define | TOO_FAR 4096
#define | MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
#define | EQUAL 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, eof)
#define | FLUSH_BLOCK(s, eof)
## Typedefs
typedef block_state(* | compress_func )()
typedef config_s | config
## Enumerations
enum | block_state { need_more, block_done, finish_started, finish_done }
## Functions
void | fill_window ()
block_state | deflate_stored ()
block_state | deflate_fast ()
block_state | deflate_slow ()
void | lm_init ()
void | putShortMSB ()
void | flush_pending ()
int | read_buf ()
uInt | longest_match ()
int | deflateInit_ (strm, level, version, stream_size) z_streamp strm
## Variables
char | deflate_copyright []
config | configuration_table [10]
int | level
char * | version
int | stream_size
int | method
int | windowBits
int | memLevel
int | strategy
Bytef * | dictionary
uInt | dictLength
uInt | b
int | flush
z_streamp | source
Bytef * | buf
unsigned | size
IPos | cur_match

## Define Documentation

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

#define CLEAR_HASH | ( | s |  | ) |

| Value:
    s->head[s->hash_size-1] = NIL; \
        zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));

#define EQUAL 0

#define FLUSH_BLOCK | ( | s,
|  | eof |  | ) |

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

#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]")); \
    }

#define INSERT_STRING | ( | s,
|  | str,
|  | match_head |  | ) |

| Value:
    (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
        s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
        s->head[s->ins_h] = (Pos)(str))

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

## Typedef Documentation

typedef block_state(* compress_func)()

typedef struct config_s config

## Enumeration Type Documentation

enum block_state

  | Enumeration values:
  need_more |
  block_done |
  finish_started |
  finish_done |

## Function Documentation

block_state deflate_fast | ( |  | ) | `[static]`

block_state deflate_slow | ( |  | ) | `[static]`

block_state deflate_stored | ( |  | ) | `[static]`

int deflateInit_ | ( | strm | ,
|  | level | ,
|  | version | ,
|  | stream_size |
| ) |

void fill_window | ( |  | ) | `[static]`

void flush_pending | ( |  | ) | `[static]`

void lm_init | ( |  | ) | `[static]`

uInt longest_match | ( |  | ) | `[static]`

void putShortMSB | ( |  | ) | `[static]`

int read_buf | ( |  | ) | `[static]`

## Variable Documentation

uInt b

Bytef* buf

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}}

IPos cur_match

char deflate_copyright[]

| Initial value:
       " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly "

Bytef* dictionary

uInt dictLength

int flush

int level

int memLevel

int method

unsigned size

z_streamp source

int strategy

int stream_size

char * version

int windowBits