NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
deflate.h File Reference
#include "zutil_cf.h"
+ Include dependency graph for deflate.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  ct_data_s
 
struct  tree_desc_s
 
struct  internal_state
 

Macros

#define LENGTH_CODES   29
 
#define LITERALS   256
 
#define L_CODES   (LITERALS+1+LENGTH_CODES)
 
#define D_CODES   30
 
#define BL_CODES   19
 
#define HEAP_SIZE   (2*L_CODES+1)
 
#define MAX_BITS   15
 
#define Buf_size   64
 
#define INIT_STATE   42
 
#define EXTRA_STATE   69
 
#define NAME_STATE   73
 
#define COMMENT_STATE   91
 
#define HCRC_STATE   103
 
#define BUSY_STATE   113
 
#define FINISH_STATE   666
 
#define Freq   fc.freq
 
#define Code   fc.code
 
#define Dad   dl.dad
 
#define Len   dl.len
 
#define max_insert_length   max_lazy_match
 
#define put_byte(s, c)   {s->pending_buf[s->pending++] = (c);}
 
#define put_short(s, w)
 
#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)
 
#define MAX_DIST(s)   ((s)->w_size-MIN_LOOKAHEAD)
 
#define WIN_INIT   MAX_MATCH
 
#define d_code(dist)    ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
 
#define _tr_tally_lit(s, c, flush)
 
#define _tr_tally_dist(s, distance, length, flush)
 
#define likely(x)   __builtin_expect((x),1)
 
#define unlikely(x)   __builtin_expect((x),0)
 

Typedefs

typedef struct ct_data_s ct_data
 
typedef struct static_tree_desc_s static_tree_desc
 
typedef struct tree_desc_s tree_desc
 
typedef uint16_t Pos
 
typedef uint32_t IPos
 
typedef struct internal_state deflate_state
 

Functions

void ZLIB_INTERNAL _tr_init (deflate_state *s)
 
int ZLIB_INTERNAL _tr_tally (deflate_state *s, uint32_t dist, unsigned lc)
 
void ZLIB_INTERNAL _tr_flush_block (deflate_state *s, uint8_t *buf, uint64_t stored_len, int last)
 
void ZLIB_INTERNAL _tr_flush_bits (deflate_state *s)
 
void ZLIB_INTERNAL _tr_align (deflate_state *s)
 
void ZLIB_INTERNAL _tr_stored_block (deflate_state *s, uint8_t *buf, uint64_t stored_len, int last)
 

Variables

const uint8_t ZLIB_INTERNAL _length_code []
 
const uint8_t ZLIB_INTERNAL _dist_code []
 

Macro Definition Documentation

◆ _tr_tally_dist

#define _tr_tally_dist (   s,
  distance,
  length,
  flush 
)
Value:
{ uch len = (uch)(length); \
ush dist = (ush)(distance); \
s->sym_buf[s->sym_next++] = dist; \
s->sym_buf[s->sym_next++] = dist >> 8; \
s->sym_buf[s->sym_next++] = len; \
dist--; \
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
s->dyn_dtree[d_code(dist)].Freq++; \
flush = (s->sym_next == s->sym_end); \
}
int len
#define uch
uch ZLIB_INTERNAL _length_code[]
Definition: trees.c:104
#define LITERALS
Definition: deflate.h:25
#define d_code(dist)
Definition: deflate.h:299
unsigned short ush
Definition: zutil.h:41
unsigned char uch
Definition: zutil.h:39

Definition at line 317 of file deflate.h.

◆ _tr_tally_lit

#define _tr_tally_lit (   s,
  c,
  flush 
)
Value:
{ uch cc = (c); \
s->sym_buf[s->sym_next++] = 0; \
s->sym_buf[s->sym_next++] = 0; \
s->sym_buf[s->sym_next++] = cc; \
s->dyn_ltree[cc].Freq++; \
flush = (s->sym_next == s->sym_end); \
}

Definition at line 309 of file deflate.h.

◆ BL_CODES

#define BL_CODES   19

Definition at line 34 of file deflate.h.

◆ Buf_size

#define Buf_size   64

Definition at line 43 of file deflate.h.

◆ BUSY_STATE

#define BUSY_STATE   113

Definition at line 51 of file deflate.h.

◆ Code

#define Code   fc.code

Definition at line 69 of file deflate.h.

◆ COMMENT_STATE

#define COMMENT_STATE   91

Definition at line 49 of file deflate.h.

◆ d_code

#define d_code (   dist)     ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])

Definition at line 299 of file deflate.h.

◆ D_CODES

#define D_CODES   30

Definition at line 31 of file deflate.h.

◆ Dad

#define Dad   dl.dad

Definition at line 70 of file deflate.h.

◆ EXTRA_STATE

#define EXTRA_STATE   69

Definition at line 47 of file deflate.h.

◆ FINISH_STATE

#define FINISH_STATE   666

Definition at line 52 of file deflate.h.

◆ Freq

#define Freq   fc.freq

Definition at line 68 of file deflate.h.

◆ HCRC_STATE

#define HCRC_STATE   103

Definition at line 50 of file deflate.h.

◆ HEAP_SIZE

#define HEAP_SIZE   (2*L_CODES+1)

Definition at line 37 of file deflate.h.

◆ INIT_STATE

#define INIT_STATE   42

Definition at line 46 of file deflate.h.

◆ L_CODES

#define L_CODES   (LITERALS+1+LENGTH_CODES)

Definition at line 28 of file deflate.h.

◆ Len

#define Len   dl.len

Definition at line 71 of file deflate.h.

◆ LENGTH_CODES

#define LENGTH_CODES   29

Definition at line 22 of file deflate.h.

◆ likely

#define likely (   x)    __builtin_expect((x),1)

Definition at line 344 of file deflate.h.

◆ LITERALS

#define LITERALS   256

Definition at line 25 of file deflate.h.

◆ MAX_BITS

#define MAX_BITS   15

Definition at line 40 of file deflate.h.

◆ MAX_DIST

#define MAX_DIST (   s)    ((s)->w_size-MIN_LOOKAHEAD)

Definition at line 280 of file deflate.h.

◆ max_insert_length

#define max_insert_length   max_lazy_match

Definition at line 169 of file deflate.h.

◆ MIN_LOOKAHEAD

#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)

Definition at line 275 of file deflate.h.

◆ NAME_STATE

#define NAME_STATE   73

Definition at line 48 of file deflate.h.

◆ put_byte

#define put_byte (   s,
 
)    {s->pending_buf[s->pending++] = (c);}

Definition at line 263 of file deflate.h.

◆ put_short

#define put_short (   s,
 
)
Value:
{ \
s->pending += 2; \
*(ush*)(&s->pending_buf[s->pending - 2]) = (w) ; \
}

Definition at line 270 of file deflate.h.

◆ unlikely

#define unlikely (   x)    __builtin_expect((x),0)

Definition at line 345 of file deflate.h.

◆ WIN_INIT

#define WIN_INIT   MAX_MATCH

Definition at line 285 of file deflate.h.

Typedef Documentation

◆ ct_data

typedef struct ct_data_s ct_data

◆ deflate_state

typedef struct internal_state deflate_state

◆ IPos

typedef uint32_t IPos

Definition at line 82 of file deflate.h.

◆ Pos

typedef uint16_t Pos

Definition at line 81 of file deflate.h.

◆ static_tree_desc

Definition at line 1 of file deflate.h.

◆ tree_desc

typedef struct tree_desc_s tree_desc

Function Documentation

◆ _tr_align()

void ZLIB_INTERNAL _tr_align ( deflate_state s)

Definition at line 897 of file trees.c.

References bi_flush(), END_BLOCK, send_bits, send_code, static_ltree, and STATIC_TREES.

◆ _tr_flush_bits()

void ZLIB_INTERNAL _tr_flush_bits ( deflate_state s)

Definition at line 887 of file trees.c.

References bi_flush().

◆ _tr_flush_block()

void ZLIB_INTERNAL _tr_flush_block ( deflate_state s,
uint8_t buf,
uint64_t  stored_len,
int  last 
)

◆ _tr_init()

void ZLIB_INTERNAL _tr_init ( deflate_state s)

◆ _tr_stored_block()

void ZLIB_INTERNAL _tr_stored_block ( deflate_state s,
uint8_t buf,
uint64_t  stored_len,
int  last 
)

Definition at line 802 of file trees.c.

References buf, copy_block(), last(), send_bits(), and STORED_BLOCK.

◆ _tr_tally()

int ZLIB_INTERNAL _tr_tally ( deflate_state s,
uint32_t  dist,
unsigned  lc 
)

Variable Documentation

◆ _dist_code

const uint8_t ZLIB_INTERNAL _dist_code[]
extern

Definition at line 98 of file trees.c.

Referenced by tr_static_init().

◆ _length_code

const uint8_t ZLIB_INTERNAL _length_code[]
extern

Definition at line 104 of file trees.c.

Referenced by _tr_tally(), compress_block(), and tr_static_init().

Modified on Wed Jun 19 17:00:50 2024 by modify_doxy.py rev. 669887