Lines Matching refs:bits
24 ** bits and computing the longest bit-string representing bytes that
33 #define TRIE_TOP 8 /* max #bits for top level */
34 #define TRIE_SUB 4 /* max #bits for sub levels */
42 static int bldtrie(Vchtrie_t* trie, ssize_t* clen, Vcbit_t* bits,
45 static int bldtrie(trie, clen, bits, root, len, sort, ns, lev)
48 Vcbit_t* bits; /* table of prefix codes */
62 if((s = clen[sort[k]-bits]) > m)
65 /* # of bits to pick out at this level */
100 z = clen[m = sort[k]-bits];
104 size[s] = z-olen; /* # bits to consume */
110 { if(len >= clen[sort[m]-bits])
117 if(bldtrie(trie,clen,bits,&nd,len,sort+k,m-k,lev+1) < 0 )
126 size[s] = nd.size; /* #bits needed to index it */
135 /* sort by prefix bits */
150 Vchtrie_t* vchbldtrie(ssize_t nsym, ssize_t* size, Vcbit_t* bits)
152 Vchtrie_t* vchbldtrie(nsym, size, bits)
155 Vcbit_t* bits; /* array of code bits */
178 sort[ns++] = bits+k;
181 if(bldtrie(trie, size, bits, &root, 0, sort, ns, 0) < 0 )