Lines Matching refs:rem
157 Each element in the array is further indexed by the (mem, rem) doublet,
158 where mem is the amount of inflate table space used so far, and rem is the
161 not. Since the ranges for mem and rem are not known a priori, each bit
163 states. mem and rem are used to calculate a single index in a triangular
165 ten times larger than the range of rem, the array is skewed to reduce the
166 memory usage, with eight times the range for mem than for rem. See the
306 // variable size bit vector indexed by (mem,rem). The bit vector is lengthened
307 // as needed to allow setting the (mem,rem) bit.
308 local int been_here(int syms, int left, int len, int mem, int rem) {
309 // point to vector for (syms,left,len), bit in vector for (mem,rem)
312 mem >>= 1; // mem and rem are always even
313 rem >>= 1;
314 size_t offset = (mem >> 3) + rem;
315 offset = ((offset * (offset + 1)) >> 1) + rem;
360 // the current sub-table is rem.
361 rem) {
368 while (rem < left) {
369 left -= rem;
370 rem = 1 << (len - g.root);
371 mem += rem;
373 assert(rem == left);
409 if (been_here(syms, left, len, mem, rem))
426 while (rem < use) {
427 use -= rem;
428 rem = 1 << (len - g.root);
429 mem += rem;
431 rem -= use;
437 mem + (rem ? 1 << (len - g.root) : 0), rem << 1);
438 if (rem == 0) {
439 rem = 1 << (len - g.root);
440 mem += rem;
442 rem--;