Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ZTrees.c File Reference
#include "Bits.h"
#include <ctype.h>
#include "ThreadLocalStorage.h"
Include dependency graph for ZTrees.c:

Classes

struct  ct_data
struct  tree_desc
struct  tree_internal_state

Macros

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

Typedefs

typedef struct ct_data ct_data
typedef struct tree_desc tree_desc

Functions

static int R__build_bl_tree ()
static int R__build_bl_tree (tree_internal_state *t_state)
static int R__build_tree ()
static int R__build_tree (tree_internal_state *t_state, tree_desc *desc)
static int R__compress_block ()
static int R__compress_block (bits_internal_state *state, tree_internal_state *t_state, ct_data *ltree, ct_data *dtree)
int R__ct_init (tree_internal_state *t_state, ush *attr, int *method)
int R__ct_tally (bits_internal_state *state, int dist, int lc)
ulg R__flush_block (bits_internal_state *state, char *buf, ulg stored_len, int eof, int *errorflag)
static int R__gen_bitlen ()
static int R__gen_bitlen (tree_internal_state *t_state, tree_desc *desc)
static int R__gen_codes ()
static int R__gen_codes (tree_internal_state *t_state, ct_data *tree, int max_code)
tree_internal_stateR__get_thread_tree_state ()
static int R__init_block ()
static int R__init_block (tree_internal_state *t_state)
static int R__pqdownheap ()
static int R__pqdownheap (tree_internal_state *t_state, ct_data *tree, int k)
static int R__scan_tree ()
static int R__scan_tree (tree_internal_state *t_state, ct_data *tree, int max_code)
static int R__send_all_trees ()
static int R__send_all_trees (bits_internal_state *state, tree_internal_state *t_state, int lcodes, int dcodes, int blcodes)
static int R__send_tree ()
static int R__send_tree (bits_internal_state *state, tree_internal_state *t_state, ct_data *tree, int max_code)
static int R__set_file_type ()
static int R__set_file_type (tree_internal_state *t_state)
int R__tree_desc_init (tree_desc *tree_description, ct_data *dyn_tree, ct_data *static_tree, int *extra_bits, int extra_base, int elems, int max_length, int max_code)
 TTHREAD_TLS_DECLARE (int, tree_state_isInit)
 TTHREAD_TLS_DECLARE (tree_internal_state *, tree_state)

Variables

uch bl_order [19] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}
static int extra_blbits [19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}
static int extra_dbits [30] = {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}
static int extra_lbits [29] = {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}

Macro Definition Documentation

◆ BL_CODES

#define BL_CODES   19

Definition at line 95 of file ZTrees.c.

◆ Code

#define Code   fc.code

Definition at line 172 of file ZTrees.c.

◆ d_code

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

Definition at line 339 of file ZTrees.c.

◆ D_CODES

#define D_CODES   30

Definition at line 92 of file ZTrees.c.

◆ Dad

#define Dad   dl.dad

Definition at line 173 of file ZTrees.c.

◆ DIST_BUFSIZE

#define DIST_BUFSIZE   LIT_BUFSIZE

Definition at line 124 of file ZTrees.c.

◆ DYN_TREES

#define DYN_TREES   2

Definition at line 110 of file ZTrees.c.

◆ END_BLOCK

#define END_BLOCK   256

Definition at line 86 of file ZTrees.c.

◆ Freq

#define Freq   fc.freq

Definition at line 171 of file ZTrees.c.

◆ HEAP_SIZE

#define HEAP_SIZE   (2*L_CODES+1)

Definition at line 176 of file ZTrees.c.

◆ L_CODES

#define L_CODES   (LITERALS+1+LENGTH_CODES)

Definition at line 89 of file ZTrees.c.

◆ Len

#define Len   dl.len

Definition at line 174 of file ZTrees.c.

◆ LENGTH_CODES

#define LENGTH_CODES   29

Definition at line 80 of file ZTrees.c.

◆ LIT_BUFSIZE

#define LIT_BUFSIZE   0x8000

Definition at line 120 of file ZTrees.c.

◆ LITERALS

#define LITERALS   256

Definition at line 83 of file ZTrees.c.

◆ MAX

#define MAX ( a,
b )
Value:
(a >= b ? a : b)
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99

Definition at line 346 of file ZTrees.c.

◆ MAX_BITS

#define MAX_BITS   15

Definition at line 74 of file ZTrees.c.

◆ MAX_BL_BITS

#define MAX_BL_BITS   7

Definition at line 77 of file ZTrees.c.

◆ pqremove

#define pqremove ( tree,
top )
Value:
{\
top = t_state->heap[SMALLEST]; \
t_state->heap[SMALLEST] = t_state->heap[t_state->heap_len--]; \
R__pqdownheap(t_state, tree, SMALLEST); \
}
#define SMALLEST
Definition ZTrees.c:477
TTree * tree

Definition at line 485 of file ZTrees.c.

◆ REP_3_6

#define REP_3_6   16

Definition at line 146 of file ZTrees.c.

◆ REPZ_11_138

#define REPZ_11_138   18

Definition at line 152 of file ZTrees.c.

◆ REPZ_3_10

#define REPZ_3_10   17

Definition at line 149 of file ZTrees.c.

◆ send_code

#define send_code ( c,
tree )
Value:
int R__send_bits(bits_internal_state *state, int value, int length)
Definition Bits.c:151
#define c(i)
Definition RSha256.hxx:101
#define Code
Definition ZTrees.c:172
#define Len
Definition ZTrees.c:174

Definition at line 330 of file ZTrees.c.

◆ smaller

#define smaller ( tree,
n,
m )
Value:
(tree[n].Freq < tree[m].Freq || \
(tree[n].Freq == tree[m].Freq && t_state->depth[n] <= t_state->depth[m]))
const Int_t n
Definition legend1.C:16
TMarker m
Definition textangle.C:8

Definition at line 496 of file ZTrees.c.

◆ SMALLEST

#define SMALLEST   1

Definition at line 477 of file ZTrees.c.

◆ STATIC_TREES

#define STATIC_TREES   1

Definition at line 109 of file ZTrees.c.

◆ STORED_BLOCK

#define STORED_BLOCK   0

Definition at line 108 of file ZTrees.c.

Typedef Documentation

◆ ct_data

typedef struct ct_data ct_data

◆ tree_desc

typedef struct tree_desc tree_desc

Function Documentation

◆ R__build_bl_tree() [1/2]

int R__build_bl_tree ( )
static

◆ R__build_bl_tree() [2/2]

int R__build_bl_tree ( tree_internal_state * t_state)
static

Definition at line 849 of file ZTrees.c.

◆ R__build_tree() [1/2]

int R__build_tree ( )
static

◆ R__build_tree() [2/2]

int R__build_tree ( tree_internal_state * t_state,
tree_desc * desc )
static

Definition at line 668 of file ZTrees.c.

◆ R__compress_block() [1/2]

int R__compress_block ( )
static

◆ R__compress_block() [2/2]

int R__compress_block ( bits_internal_state * state,
tree_internal_state * t_state,
ct_data * ltree,
ct_data * dtree )
static

Definition at line 1089 of file ZTrees.c.

◆ R__ct_init()

int R__ct_init ( tree_internal_state * t_state,
ush * attr,
int * method )

Definition at line 373 of file ZTrees.c.

◆ R__ct_tally()

int R__ct_tally ( bits_internal_state * state,
int dist,
int lc )

Definition at line 1035 of file ZTrees.c.

◆ R__flush_block()

ulg R__flush_block ( bits_internal_state * state,
char * buf,
ulg stored_len,
int eof,
int * errorflag )

Definition at line 913 of file ZTrees.c.

◆ R__gen_bitlen() [1/2]

int R__gen_bitlen ( )
static

◆ R__gen_bitlen() [2/2]

int R__gen_bitlen ( tree_internal_state * t_state,
tree_desc * desc )
static

Definition at line 542 of file ZTrees.c.

◆ R__gen_codes() [1/2]

int R__gen_codes ( )
static

◆ R__gen_codes() [2/2]

int R__gen_codes ( tree_internal_state * t_state,
ct_data * tree,
int max_code )
static

Definition at line 627 of file ZTrees.c.

◆ R__get_thread_tree_state()

tree_internal_state * R__get_thread_tree_state ( )

Definition at line 293 of file ZTrees.c.

◆ R__init_block() [1/2]

int R__init_block ( )
static

◆ R__init_block() [2/2]

int R__init_block ( tree_internal_state * t_state)
static

Definition at line 462 of file ZTrees.c.

◆ R__pqdownheap() [1/2]

int R__pqdownheap ( )
static

◆ R__pqdownheap() [2/2]

int R__pqdownheap ( tree_internal_state * t_state,
ct_data * tree,
int k )
static

Definition at line 506 of file ZTrees.c.

◆ R__scan_tree() [1/2]

int R__scan_tree ( )
static

◆ R__scan_tree() [2/2]

int R__scan_tree ( tree_internal_state * t_state,
ct_data * tree,
int max_code )
static

Definition at line 755 of file ZTrees.c.

◆ R__send_all_trees() [1/2]

int R__send_all_trees ( )
static

◆ R__send_all_trees() [2/2]

int R__send_all_trees ( bits_internal_state * state,
tree_internal_state * t_state,
int lcodes,
int dcodes,
int blcodes )
static

Definition at line 882 of file ZTrees.c.

◆ R__send_tree() [1/2]

int R__send_tree ( )
static

◆ R__send_tree() [2/2]

int R__send_tree ( bits_internal_state * state,
tree_internal_state * t_state,
ct_data * tree,
int max_code )
static

Definition at line 799 of file ZTrees.c.

◆ R__set_file_type() [1/2]

int R__set_file_type ( )
static

◆ R__set_file_type() [2/2]

int R__set_file_type ( tree_internal_state * t_state)
static

Definition at line 1141 of file ZTrees.c.

◆ R__tree_desc_init()

int R__tree_desc_init ( tree_desc * tree_description,
ct_data * dyn_tree,
ct_data * static_tree,
int * extra_bits,
int extra_base,
int elems,
int max_length,
int max_code )

Definition at line 349 of file ZTrees.c.

◆ TTHREAD_TLS_DECLARE() [1/2]

TTHREAD_TLS_DECLARE ( int ,
tree_state_isInit  )

◆ TTHREAD_TLS_DECLARE() [2/2]

TTHREAD_TLS_DECLARE ( tree_internal_state * ,
tree_state  )

Variable Documentation

◆ bl_order

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

Definition at line 179 of file ZTrees.c.

◆ extra_blbits

int extra_blbits[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}
static

Definition at line 105 of file ZTrees.c.

◆ extra_dbits

int extra_dbits[30] = {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}
static

Definition at line 102 of file ZTrees.c.

◆ extra_lbits

int extra_lbits[29] = {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}
static

Definition at line 99 of file ZTrees.c.