Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
deftree.c File Reference
#include <linux/zutil.h>
#include "defutil.h"

Go to the source code of this file.

Data Structures

struct  static_tree_desc_s
 

Macros

#define MAX_BL_BITS   7
 
#define END_BLOCK   256
 
#define REP_3_6   16
 
#define REPZ_3_10   17
 
#define REPZ_11_138   18
 
#define Buf_size   (8 * 2*sizeof(char))
 
#define send_code(s, c, tree)   send_bits(s, tree[c].Code, tree[c].Len)
 
#define d_code(dist)   ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
 
#define send_bits(s, value, length)
 
#define SMALLEST   1
 
#define pqremove(s, tree, top)
 
#define smaller(tree, n, m, depth)
 

Functions

void zlib_tr_init (deflate_state *s)
 
void zlib_tr_stored_block (deflate_state *s, char *buf, ulg stored_len, int eof)
 
void zlib_tr_stored_type_only (deflate_state *s)
 
void zlib_tr_align (deflate_state *s)
 
ulg zlib_tr_flush_block (deflate_state *s, char *buf, ulg stored_len, int eof)
 
int zlib_tr_tally (deflate_state *s, unsigned dist, unsigned lc)
 

Macro Definition Documentation

#define Buf_size   (8 * 2*sizeof(char))

Definition at line 78 of file deftree.c.

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

Definition at line 165 of file deftree.c.

#define END_BLOCK   256

Definition at line 51 of file deftree.c.

#define MAX_BL_BITS   7

Definition at line 48 of file deftree.c.

#define pqremove (   s,
  tree,
  top 
)
Value:
{\
top = s->heap[SMALLEST]; \
s->heap[SMALLEST] = s->heap[s->heap_len--]; \
pqdownheap(s, tree, SMALLEST); \
}

Definition at line 350 of file deftree.c.

#define REP_3_6   16

Definition at line 54 of file deftree.c.

#define REPZ_11_138   18

Definition at line 60 of file deftree.c.

#define REPZ_3_10   17

Definition at line 57 of file deftree.c.

#define send_bits (   s,
  value,
  length 
)
Value:
{ int len = length;\
if (s->bi_valid > (int)Buf_size - len) {\
int val = value;\
s->bi_buf |= (val << s->bi_valid);\
put_short(s, s->bi_buf);\
s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
s->bi_valid += len - Buf_size;\
} else {\
s->bi_buf |= (value) << s->bi_valid;\
s->bi_valid += len;\
}\
}

Definition at line 205 of file deftree.c.

#define send_code (   s,
  c,
  tree 
)    send_bits(s, tree[c].Code, tree[c].Len)

Definition at line 156 of file deftree.c.

#define smaller (   tree,
  n,
  m,
  depth 
)
Value:
(tree[n].Freq < tree[m].Freq || \
(tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))

Definition at line 361 of file deftree.c.

#define SMALLEST   1

Definition at line 342 of file deftree.c.

Function Documentation

void zlib_tr_align ( deflate_state s)

Definition at line 829 of file deftree.c.

ulg zlib_tr_flush_block ( deflate_state s,
char buf,
ulg  stored_len,
int  eof 
)

Definition at line 856 of file deftree.c.

void zlib_tr_init ( deflate_state s)

Definition at line 295 of file deftree.c.

void zlib_tr_stored_block ( deflate_state s,
char buf,
ulg  stored_len,
int  eof 
)

Definition at line 792 of file deftree.c.

void zlib_tr_stored_type_only ( deflate_state s)

Definition at line 808 of file deftree.c.

int zlib_tr_tally ( deflate_state s,
unsigned  dist,
unsigned  lc 
)

Definition at line 969 of file deftree.c.