1 #if !defined(_bitrenc_H)
2 # define _bitredec_H (1)
5 /*Decoder-specific functions for Binary Indexed Trees.
6 See bitree.h for more detailed documentation.*/
8 /*Gets the symbol that corresponds with a given frequency.
9 This is an omnibus function that also computes the cumulative frequency of
10 the symbols before the one returned, and updates the count of that symbol by
12 _sz: The size of the table.
13 _split: The largest power of two less than OR EQUAL to the table size.
14 _freq: A frequency in the range of one of the symbols in the alphabet.
15 _fl: Returns the sum of the frequencies of the symbols less than that of
17 _val: The amount to add to returned symbol's frequency.
18 Return: The smallest symbol whose cumulative frequency is greater than freq.*/
19 int ec_bitree_find_and_update(unsigned *_this,int _sz,int _split,
20 unsigned _freq,unsigned *_fl,int _val);