ZTrees.h File Reference

#include <ctype.h>

Go to the source code of this file.

Classes

struct  ct_data
struct  tree_desc

Defines

#define MAX_BITS   15
#define MAX_BL_BITS   7
#define LENGTH_CODES   29
#define LITERALS   256
#define END_BLOCK   256
#define L_CODES   (LITERALS+1+LENGTH_CODES)
#define D_CODES   30
#define BL_CODES   19
#define STORED_BLOCK   0
#define STATIC_TREES   1
#define DYN_TREES   2
#define LIT_BUFSIZE   0x8000
#define DIST_BUFSIZE   LIT_BUFSIZE
#define REP_3_6   16
#define REPZ_3_10   17
#define REPZ_11_138   18
#define Freq   fc.freq
#define Code   fc.code
#define Dad   dl.dad
#define Len   dl.len
#define HEAP_SIZE   (2*L_CODES+1)
#define send_code(c, tree)   R__send_bits(tree[c].Code, tree[c].Len)
#define d_code(dist)   ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
#define MAX(a, b)   (a >= b ? a : b)
#define SMALLEST   1
#define pqremove(tree, top)
#define smaller(tree, n, m)

Functions

local void R__init_block OF ((void))
local void R__pqdownheap OF ((ct_data near *tree, int k))
local void R__gen_bitlen OF ((tree_desc near *desc))
local void R__gen_codes OF ((ct_data near *tree, int max_code))
local void R__send_all_trees OF ((int lcodes, int dcodes, int blcodes))
local void R__compress_block OF ((ct_data near *ltree, ct_data near *dtree))
void R__ct_init (ush *attr, int *method)
local void R__init_block ()
local void R__pqdownheap (ct_data near *tree, int k)
local void R__gen_bitlen (tree_desc near *desc)
local void R__gen_codes (ct_data near *tree, int max_code)
local void R__build_tree (tree_desc near *desc)
local void R__scan_tree (ct_data near *tree, int max_code)
local void R__send_tree (ct_data near *tree, int max_code)
local int R__build_bl_tree ()
local void R__send_all_trees (int lcodes, int dcodes, int blcodes)
ulg R__flush_block (char *buf, ulg stored_len, int eof)
int R__ct_tally (int dist, int lc)
local void R__compress_block (ct_data near *ltree, ct_data near *dtree)
local void R__set_file_type ()

Variables

local int near extra_lbits [LENGTH_CODES] = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}
local int near extra_dbits [D_CODES] = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}
local int near extra_blbits [BL_CODES] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}
local ct_data near dyn_ltree [HEAP_SIZE]
local ct_data near dyn_dtree [2 *D_CODES+1]
local ct_data near static_ltree [L_CODES+2]
local ct_data near static_dtree [D_CODES]
local ct_data near bl_tree [2 *BL_CODES+1]
local tree_desc near l_desc
local tree_desc near d_desc
local tree_desc near bl_desc
local ush near bl_count [MAX_BITS+1]
local uch near bl_order [BL_CODES] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}
local int near heap [2 *L_CODES+1]
local int heap_len
local int heap_max
local uch near depth [2 *L_CODES+1]
local uch length_code [MAX_MATCH-MIN_MATCH+1]
local uch dist_code [512]
local int near base_length [LENGTH_CODES]
local int near base_dist [D_CODES]
local uch far l_buf [LIT_BUFSIZE]
local ush far d_buf [DIST_BUFSIZE]
local uch near flag_buf [(LIT_BUFSIZE/8)]
local unsigned last_lit
local unsigned last_dist
local unsigned last_flags
local uch flags
local uch flag_bit
local ulg opt_len
local ulg static_len
local ulg compressed_len
local ulg input_len
ushR__file_type
int * R__file_method


Define Documentation

#define BL_CODES   19

Definition at line 94 of file ZTrees.h.

#define Code   fc.code

Definition at line 171 of file ZTrees.h.

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

Definition at line 319 of file ZTrees.h.

#define D_CODES   30

Definition at line 91 of file ZTrees.h.

#define Dad   dl.dad

Definition at line 172 of file ZTrees.h.

#define DIST_BUFSIZE   LIT_BUFSIZE

Definition at line 123 of file ZTrees.h.

#define DYN_TREES   2

Definition at line 109 of file ZTrees.h.

#define END_BLOCK   256

Definition at line 85 of file ZTrees.h.

#define Freq   fc.freq

Definition at line 170 of file ZTrees.h.

#define HEAP_SIZE   (2*L_CODES+1)

Definition at line 175 of file ZTrees.h.

#define L_CODES   (LITERALS+1+LENGTH_CODES)

Definition at line 88 of file ZTrees.h.

#define Len   dl.len

Definition at line 173 of file ZTrees.h.

#define LENGTH_CODES   29

Definition at line 79 of file ZTrees.h.

#define LIT_BUFSIZE   0x8000

Definition at line 119 of file ZTrees.h.

#define LITERALS   256

Definition at line 82 of file ZTrees.h.

#define MAX ( a,
b   )     (a >= b ? a : b)

Definition at line 326 of file ZTrees.h.

#define MAX_BITS   15

Definition at line 73 of file ZTrees.h.

#define MAX_BL_BITS   7

Definition at line 76 of file ZTrees.h.

#define pqremove ( tree,
top   ) 

Value:

Definition at line 439 of file ZTrees.h.

#define REP_3_6   16

Definition at line 145 of file ZTrees.h.

#define REPZ_11_138   18

Definition at line 151 of file ZTrees.h.

#define REPZ_3_10   17

Definition at line 148 of file ZTrees.h.

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

Definition at line 310 of file ZTrees.h.

#define smaller ( tree,
n,
m   ) 

Value:

(tree[n].Freq < tree[m].Freq || \
   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))

Definition at line 450 of file ZTrees.h.

#define SMALLEST   1

Definition at line 431 of file ZTrees.h.

#define STATIC_TREES   1

Definition at line 108 of file ZTrees.h.

#define STORED_BLOCK   0

Definition at line 107 of file ZTrees.h.


Function Documentation

local void R__compress_block OF ( (ct_data near *ltree, ct_data near *dtree)   ) 

local void R__send_all_trees OF ( (int lcodes, int dcodes, int blcodes)   ) 

local void R__gen_codes OF ( (ct_data near *tree, int max_code)   ) 

local void R__gen_bitlen OF ( (tree_desc near *desc)   ) 

local void R__pqdownheap OF ( (ct_data near *tree, int k)   ) 

local void R__init_block OF ( (void)   ) 

local int R__build_bl_tree (  ) 

Definition at line 803 of file ZTrees.h.

References BL_CODES, bl_desc, bl_order, bl_tree, d_desc, dyn_dtree, dyn_ltree, l_desc, Len, tree_desc::max_code, near, opt_len, R__build_tree(), R__scan_tree(), static_len, and Tracev.

local void R__build_tree ( tree_desc near *  desc  ) 

Definition at line 622 of file ZTrees.h.

References bl_tree, depth, fprintf(), Freq, heap, heap_len, heap_max, HEAP_SIZE, Len, m, MAX, n, near, opt_len, pqremove, R__gen_bitlen(), R__gen_codes(), R__pqdownheap(), SMALLEST, and static_len.

local void R__compress_block ( ct_data near *  ltree,
ct_data near *  dtree 
)

Definition at line 1041 of file ZTrees.h.

References Assert, base_dist, base_length, d_buf, d_code, D_CODES, ROOT::Math::gv_detail::dist(), END_BLOCK, extra, extra_dbits, extra_lbits, flag, flag_buf, l_buf, last_lit, length_code, LITERALS, R__send_bits(), send_code, and Tracecv.

void R__ct_init ( ush attr,
int *  method 
)

Definition at line 334 of file ZTrees.h.

References Assert, base_dist, base_length, bits, bl_count, compressed_len, d_buf, D_CODES, ROOT::Math::gv_detail::dist(), DIST_BUFSIZE, dist_code, extra_dbits, extra_lbits, far, fcalloc, input_len, RooFitShortHand::L(), l_buf, L_CODES, Len, length, length_code, LENGTH_CODES, LIT_BUFSIZE, MAX_BITS, n, near, NULL, R__bi_reverse(), R__error(), R__file_method, R__file_type, R__gen_codes(), R__init_block(), static_dtree, and static_ltree.

int R__ct_tally ( int  dist,
int  lc 
)

Definition at line 988 of file ZTrees.h.

References Assert, d_buf, d_code, D_CODES, DIST_BUFSIZE, dyn_dtree, dyn_ltree, extra_dbits, flag_bit, flag_buf, flags, Freq, RooFitShortHand::L(), l_buf, last_dist, last_flags, last_lit, length_code, level, LIT_BUFSIZE, LITERALS, MAX_DIST, MAX_MATCH, MIN_MATCH, R__block_start, R__strstart, and Trace.

ulg R__flush_block ( char *  buf,
ulg  stored_len,
int  eof 
)

Definition at line 867 of file ZTrees.h.

References Assert, compressed_len, d_desc, dyn_dtree, dyn_ltree, DYN_TREES, flag_buf, flags, input_len, RooFitShortHand::L(), l_desc, last_dist, last_flags, last_lit, level, near, NULL, opt_len, R__bi_windup(), R__build_bl_tree(), R__build_tree(), R__compress_block(), R__copy_block(), R__error(), R__file_method, R__file_type, R__init_block(), R__seekable(), R__send_all_trees(), R__send_bits(), R__set_file_type(), R__window, static_dtree, static_len, static_ltree, STATIC_TREES, STORE, STORED_BLOCK, Trace, Tracev, UNKNOWN, and WSIZE.

local void R__gen_bitlen ( tree_desc near *  desc  ) 

Definition at line 496 of file ZTrees.h.

References bits, bl_count, extra, Freq, h, heap, heap_max, HEAP_SIZE, Len, long, m, MAX_BITS, n, near, opt_len, static_len, and Trace.

local void R__gen_codes ( ct_data near *  tree,
int  max_code 
)

Definition at line 581 of file ZTrees.h.

References Assert, bits, bl_count, Code, len, Len, MAX_BITS, n, R__bi_reverse(), static_ltree, Tracec, and Tracev.

local void R__init_block (  ) 

Definition at line 416 of file ZTrees.h.

References BL_CODES, bl_tree, D_CODES, dyn_dtree, dyn_ltree, END_BLOCK, flag_bit, flags, Freq, RooFitShortHand::L(), L_CODES, last_dist, last_flags, last_lit, n, opt_len, and static_len.

local void R__pqdownheap ( ct_data near *  tree,
int  k 
)

Definition at line 460 of file ZTrees.h.

References heap, heap_len, j, and smaller.

local void R__scan_tree ( ct_data near *  tree,
int  max_code 
)

Definition at line 709 of file ZTrees.h.

References bl_tree, Freq, n, REP_3_6, REPZ_11_138, and REPZ_3_10.

local void R__send_all_trees ( int  lcodes,
int  dcodes,
int  blcodes 
)

Definition at line 836 of file ZTrees.h.

References Assert, BL_CODES, bl_order, bl_tree, D_CODES, dyn_dtree, dyn_ltree, L_CODES, Len, near, R__send_bits(), R__send_tree(), and Tracev.

local void R__send_tree ( ct_data near *  tree,
int  max_code 
)

Definition at line 753 of file ZTrees.h.

References Assert, bl_tree, n, R__send_bits(), REP_3_6, REPZ_11_138, REPZ_3_10, and send_code.

local void R__set_file_type (  ) 

Definition at line 1093 of file ZTrees.h.

References ASCII, BINARY, dyn_ltree, LITERALS, n, R__file_type, and verbose.


Variable Documentation

local int near base_dist[D_CODES]

Definition at line 247 of file ZTrees.h.

local int near base_length[LENGTH_CODES]

Definition at line 244 of file ZTrees.h.

local ush near bl_count[MAX_BITS+1]

Definition at line 216 of file ZTrees.h.

local tree_desc near bl_desc

Initial value:

Definition at line 212 of file ZTrees.h.

local uch near bl_order[BL_CODES] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}

Definition at line 220 of file ZTrees.h.

local ct_data near bl_tree[2 *BL_CODES+1]

Definition at line 193 of file ZTrees.h.

local ulg compressed_len

Definition at line 276 of file ZTrees.h.

local ush far d_buf[DIST_BUFSIZE]

Definition at line 252 of file ZTrees.h.

local tree_desc near d_desc

Initial value:

Definition at line 209 of file ZTrees.h.

local uch near depth[2 *L_CODES+1]

Definition at line 232 of file ZTrees.h.

local uch dist_code[512]

Definition at line 238 of file ZTrees.h.

local ct_data near dyn_dtree[2 *D_CODES+1]

Definition at line 179 of file ZTrees.h.

local ct_data near dyn_ltree[HEAP_SIZE]

Definition at line 178 of file ZTrees.h.

local int near extra_blbits[BL_CODES] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}

Definition at line 105 of file ZTrees.h.

local int near extra_dbits[D_CODES] = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}

Definition at line 102 of file ZTrees.h.

local int near extra_lbits[LENGTH_CODES] = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}

Definition at line 99 of file ZTrees.h.

local uch flag_bit

Definition at line 267 of file ZTrees.h.

local uch near flag_buf[(LIT_BUFSIZE/8)]

Definition at line 258 of file ZTrees.h.

local uch flags

Definition at line 266 of file ZTrees.h.

local int near heap[2 *L_CODES+1]

Definition at line 225 of file ZTrees.h.

local int heap_len

Definition at line 226 of file ZTrees.h.

local int heap_max

Definition at line 227 of file ZTrees.h.

local ulg input_len

Definition at line 278 of file ZTrees.h.

local uch far l_buf[LIT_BUFSIZE]

Definition at line 251 of file ZTrees.h.

local tree_desc near l_desc

Initial value:

Definition at line 206 of file ZTrees.h.

local unsigned last_dist

Definition at line 264 of file ZTrees.h.

local unsigned last_flags

Definition at line 265 of file ZTrees.h.

local unsigned last_lit

Definition at line 263 of file ZTrees.h.

local uch length_code[MAX_MATCH-MIN_MATCH+1]

Definition at line 235 of file ZTrees.h.

local ulg opt_len

Definition at line 273 of file ZTrees.h.

int* R__file_method

Definition at line 282 of file ZTrees.h.

ush* R__file_type

Definition at line 281 of file ZTrees.h.

local ct_data near static_dtree[D_CODES]

Definition at line 188 of file ZTrees.h.

local ulg static_len

Definition at line 274 of file ZTrees.h.

local ct_data near static_ltree[L_CODES+2]

Definition at line 181 of file ZTrees.h.


Generated on Tue Jul 5 15:57:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1