Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

deflate.c File Reference

#include "deflate.h"

Go to the source code of this file.

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 OF ((deflate_state *s, int flush))
typedef config_s config

Enumerations

enum  block_state { need_more, block_done, finish_started, finish_done }

Functions

local void fill_window OF ((deflate_state *s))
local block_state deflate_stored OF ((deflate_state *s, int flush))
local void putShortMSB OF ((deflate_state *s, uInt b))
local void flush_pending OF ((z_streamp strm))
local int read_buf OF ((z_streamp strm, Bytef *buf, unsigned size))
local uInt longest_match OF ((deflate_state *s, IPos cur_match))
int ZEXPORT deflateInit_ (strm, level, version, stream_size) z_streamp strm

Variables

const char deflate_copyright []
local const config configuration_table [10]
int level
const char * version
int stream_size
int method
int windowBits
int memLevel
int strategy
const Bytefdictionary
uInt dictLength
uInt b
int flush
z_streamp source
Bytefbuf
unsigned size
IPos cur_match


Define Documentation

#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 185 of file deflate.c.

#define EQUAL   0
 

Definition at line 145 of file deflate.c.

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

Definition at line 175 of file deflate.c.

#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)
 

Definition at line 108 of file deflate.c.

#define NIL   0
 

Definition at line 100 of file deflate.c.

#define TOO_FAR   4096
 

Definition at line 104 of file deflate.c.

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

Definition at line 156 of file deflate.c.

#define check_match s,
start,
match,
length   
 


Typedef Documentation

ZEXTERN const uLongf *ZEXPORT get_crc_table OF
 

Definition at line 73 of file deflate.c.

typedef struct config_s config
 


Enumeration Type Documentation

enum block_state
 

Enumeration values:
need_more 
block_done 
finish_started 
finish_done 

Definition at line 66 of file deflate.c.

00066              {
00067     need_more,      /* block not completed, need more input or more output */
00068     block_done,     /* block flush performed */
00069     finish_started, /* finish started, need only more output at next deflate */
00070     finish_done     /* finish done, accept no more input or output */
00071 } block_state;


Function Documentation

local uInt longest_match OF (deflate_state *s, IPos cur_match  
 

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

local void flush_pending OF (z_streamp strm)   
 

local void putShortMSB OF (deflate_state *s, uInt b  
 

local block_state deflate_stored OF (deflate_state *s, int flush  
 

local void fill_window OF (deflate_state *s  
 

int ZEXPORT deflateInit_ strm   ,
level   ,
version   ,
stream_size   
 


Variable Documentation

uInt b
 

Definition at line 404 of file deflate.c.

Bytef* buf
 

Definition at line 664 of file deflate.c.

local 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 126 of file deflate.c.

IPos cur_match
 

Definition at line 728 of file deflate.c.

const char deflate_copyright[]
 

Initial value:

   " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly "

Definition at line 54 of file deflate.c.

uInt dictLength
 

Definition at line 294 of file deflate.c.

const Bytef* dictionary
 

Definition at line 293 of file deflate.c.

int flush
 

Definition at line 656 of file gzio.c.

int level
 

Definition at line 364 of file deflate.c.

int memLevel
 

Definition at line 208 of file deflate.c.

int method
 

Definition at line 206 of file deflate.c.

unsigned size
 

Definition at line 665 of file deflate.c.

z_streamp source
 

Definition at line 602 of file deflate.c.

int strategy
 

Definition at line 365 of file deflate.c.

int stream_size
 

Definition at line 141 of file inflate.c.

const char * version
 

Definition at line 140 of file inflate.c.

int windowBits
 

Definition at line 207 of file deflate.c.


Generated on Sat Oct 13 16:08:47 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001