• Home
  • Raw
  • Download

Lines Matching refs:s

27 void makeMaps_d ( DState* s )  in makeMaps_d()  argument
30 s->nInUse = 0; in makeMaps_d()
32 if (s->inUse[i]) { in makeMaps_d()
33 s->seqToUnseq[s->nInUse] = i; in makeMaps_d()
34 s->nInUse++; in makeMaps_d()
44 case lll: s->state = lll; \
46 if (s->bsLive >= nnn) { \
48 v = (s->bsBuff >> \
49 (s->bsLive-nnn)) & ((1 << nnn)-1); \
50 s->bsLive -= nnn; \
54 if (s->strm->avail_in == 0) RETURN(BZ_OK); \
55 s->bsBuff \
56 = (s->bsBuff << 8) | \
58 (*((UChar*)(s->strm->next_in)))); \
59 s->bsLive += 8; \
60 s->strm->next_in++; \
61 s->strm->avail_in--; \
62 s->strm->total_in_lo32++; \
63 if (s->strm->total_in_lo32 == 0) \
64 s->strm->total_in_hi32++; \
81 gSel = s->selector[groupNo]; \
82 gMinlen = s->minLens[gSel]; \
83 gLimit = &(s->limit[gSel][0]); \
84 gPerm = &(s->perm[gSel][0]); \
85 gBase = &(s->base[gSel][0]); \
106 Int32 BZ2_decompress ( DState* s ) in BZ2_decompress() argument
111 bz_stream* strm = s->strm; in BZ2_decompress()
139 if (s->state == BZ_X_MAGIC_1) { in BZ2_decompress()
141 s->save_i = 0; in BZ2_decompress()
142 s->save_j = 0; in BZ2_decompress()
143 s->save_t = 0; in BZ2_decompress()
144 s->save_alphaSize = 0; in BZ2_decompress()
145 s->save_nGroups = 0; in BZ2_decompress()
146 s->save_nSelectors = 0; in BZ2_decompress()
147 s->save_EOB = 0; in BZ2_decompress()
148 s->save_groupNo = 0; in BZ2_decompress()
149 s->save_groupPos = 0; in BZ2_decompress()
150 s->save_nextSym = 0; in BZ2_decompress()
151 s->save_nblockMAX = 0; in BZ2_decompress()
152 s->save_nblock = 0; in BZ2_decompress()
153 s->save_es = 0; in BZ2_decompress()
154 s->save_N = 0; in BZ2_decompress()
155 s->save_curr = 0; in BZ2_decompress()
156 s->save_zt = 0; in BZ2_decompress()
157 s->save_zn = 0; in BZ2_decompress()
158 s->save_zvec = 0; in BZ2_decompress()
159 s->save_zj = 0; in BZ2_decompress()
160 s->save_gSel = 0; in BZ2_decompress()
161 s->save_gMinlen = 0; in BZ2_decompress()
162 s->save_gLimit = NULL; in BZ2_decompress()
163 s->save_gBase = NULL; in BZ2_decompress()
164 s->save_gPerm = NULL; in BZ2_decompress()
168 i = s->save_i; in BZ2_decompress()
169 j = s->save_j; in BZ2_decompress()
170 t = s->save_t; in BZ2_decompress()
171 alphaSize = s->save_alphaSize; in BZ2_decompress()
172 nGroups = s->save_nGroups; in BZ2_decompress()
173 nSelectors = s->save_nSelectors; in BZ2_decompress()
174 EOB = s->save_EOB; in BZ2_decompress()
175 groupNo = s->save_groupNo; in BZ2_decompress()
176 groupPos = s->save_groupPos; in BZ2_decompress()
177 nextSym = s->save_nextSym; in BZ2_decompress()
178 nblockMAX = s->save_nblockMAX; in BZ2_decompress()
179 nblock = s->save_nblock; in BZ2_decompress()
180 es = s->save_es; in BZ2_decompress()
181 N = s->save_N; in BZ2_decompress()
182 curr = s->save_curr; in BZ2_decompress()
183 zt = s->save_zt; in BZ2_decompress()
184 zn = s->save_zn; in BZ2_decompress()
185 zvec = s->save_zvec; in BZ2_decompress()
186 zj = s->save_zj; in BZ2_decompress()
187 gSel = s->save_gSel; in BZ2_decompress()
188 gMinlen = s->save_gMinlen; in BZ2_decompress()
189 gLimit = s->save_gLimit; in BZ2_decompress()
190 gBase = s->save_gBase; in BZ2_decompress()
191 gPerm = s->save_gPerm; in BZ2_decompress()
195 switch (s->state) { in BZ2_decompress()
206 GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) in BZ2_decompress()
207 if (s->blockSize100k < (BZ_HDR_0 + 1) || in BZ2_decompress()
208 s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC); in BZ2_decompress()
209 s->blockSize100k -= BZ_HDR_0; in BZ2_decompress()
211 if (s->smallDecompress) { in BZ2_decompress()
212 s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); in BZ2_decompress()
213 s->ll4 = BZALLOC( in BZ2_decompress()
214 ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) in BZ2_decompress()
216 if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); in BZ2_decompress()
218 s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); in BZ2_decompress()
219 if (s->tt == NULL) RETURN(BZ_MEM_ERROR); in BZ2_decompress()
237 s->currBlockNo++; in BZ2_decompress()
238 if (s->verbosity >= 2) in BZ2_decompress()
239 VPrintf1 ( "\n [%d: huff+mtf ", s->currBlockNo ); in BZ2_decompress()
241 s->storedBlockCRC = 0; in BZ2_decompress()
243 s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); in BZ2_decompress()
245 s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); in BZ2_decompress()
247 s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); in BZ2_decompress()
249 s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); in BZ2_decompress()
251 GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1); in BZ2_decompress()
253 s->origPtr = 0; in BZ2_decompress()
255 s->origPtr = (s->origPtr << 8) | ((Int32)uc); in BZ2_decompress()
257 s->origPtr = (s->origPtr << 8) | ((Int32)uc); in BZ2_decompress()
259 s->origPtr = (s->origPtr << 8) | ((Int32)uc); in BZ2_decompress()
261 if (s->origPtr < 0) in BZ2_decompress()
263 if (s->origPtr > 10 + 100000*s->blockSize100k) in BZ2_decompress()
270 s->inUse16[i] = True; else in BZ2_decompress()
271 s->inUse16[i] = False; in BZ2_decompress()
274 for (i = 0; i < 256; i++) s->inUse[i] = False; in BZ2_decompress()
277 if (s->inUse16[i]) in BZ2_decompress()
280 if (uc == 1) s->inUse[i * 16 + j] = True; in BZ2_decompress()
282 makeMaps_d ( s ); in BZ2_decompress()
283 if (s->nInUse == 0) RETURN(BZ_DATA_ERROR); in BZ2_decompress()
284 alphaSize = s->nInUse+2; in BZ2_decompress()
299 s->selectorMtf[i] = j; in BZ2_decompress()
308 v = s->selectorMtf[i]; in BZ2_decompress()
312 s->selector[i] = tmp; in BZ2_decompress()
327 s->len[t][i] = curr; in BZ2_decompress()
336 if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; in BZ2_decompress()
337 if (s->len[t][i] < minLen) minLen = s->len[t][i]; in BZ2_decompress()
340 &(s->limit[t][0]), in BZ2_decompress()
341 &(s->base[t][0]), in BZ2_decompress()
342 &(s->perm[t][0]), in BZ2_decompress()
343 &(s->len[t][0]), in BZ2_decompress()
346 s->minLens[t] = minLen; in BZ2_decompress()
351 EOB = s->nInUse+1; in BZ2_decompress()
352 nblockMAX = 100000 * s->blockSize100k; in BZ2_decompress()
356 for (i = 0; i <= 255; i++) s->unzftab[i] = 0; in BZ2_decompress()
364 s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj); in BZ2_decompress()
367 s->mtfbase[ii] = kk + 1; in BZ2_decompress()
399 uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ]; in BZ2_decompress()
400 s->unzftab[uc] += es; in BZ2_decompress()
402 if (s->smallDecompress) in BZ2_decompress()
405 s->ll16[nblock] = (UInt16)uc; in BZ2_decompress()
412 s->tt[nblock] = (UInt32)uc; in BZ2_decompress()
431 pp = s->mtfbase[0]; in BZ2_decompress()
432 uc = s->mtfa[pp+nn]; in BZ2_decompress()
435 s->mtfa[(z) ] = s->mtfa[(z)-1]; in BZ2_decompress()
436 s->mtfa[(z)-1] = s->mtfa[(z)-2]; in BZ2_decompress()
437 s->mtfa[(z)-2] = s->mtfa[(z)-3]; in BZ2_decompress()
438 s->mtfa[(z)-3] = s->mtfa[(z)-4]; in BZ2_decompress()
442 s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; in BZ2_decompress()
444 s->mtfa[pp] = uc; in BZ2_decompress()
449 pp = s->mtfbase[lno] + off; in BZ2_decompress()
450 uc = s->mtfa[pp]; in BZ2_decompress()
451 while (pp > s->mtfbase[lno]) { in BZ2_decompress()
452 s->mtfa[pp] = s->mtfa[pp-1]; pp--; in BZ2_decompress()
454 s->mtfbase[lno]++; in BZ2_decompress()
456 s->mtfbase[lno]--; in BZ2_decompress()
457 s->mtfa[s->mtfbase[lno]] in BZ2_decompress()
458 = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1]; in BZ2_decompress()
461 s->mtfbase[0]--; in BZ2_decompress()
462 s->mtfa[s->mtfbase[0]] = uc; in BZ2_decompress()
463 if (s->mtfbase[0] == 0) { in BZ2_decompress()
467 s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; in BZ2_decompress()
470 s->mtfbase[ii] = kk + 1; in BZ2_decompress()
477 s->unzftab[s->seqToUnseq[uc]]++; in BZ2_decompress()
478 if (s->smallDecompress) in BZ2_decompress()
479 s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else in BZ2_decompress()
480 s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]); in BZ2_decompress()
491 if (s->origPtr < 0 || s->origPtr >= nblock) in BZ2_decompress()
497 if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) in BZ2_decompress()
501 s->cftab[0] = 0; in BZ2_decompress()
502 for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; in BZ2_decompress()
503 for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; in BZ2_decompress()
506 if (s->cftab[i] < 0 || s->cftab[i] > nblock) { in BZ2_decompress()
513 if (s->cftab[i-1] > s->cftab[i]) { in BZ2_decompress()
518 s->state_out_len = 0; in BZ2_decompress()
519 s->state_out_ch = 0; in BZ2_decompress()
520 BZ_INITIALISE_CRC ( s->calculatedBlockCRC ); in BZ2_decompress()
521 s->state = BZ_X_OUTPUT; in BZ2_decompress()
522 if (s->verbosity >= 2) VPrintf0 ( "rt+rld" ); in BZ2_decompress()
524 if (s->smallDecompress) { in BZ2_decompress()
527 for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i]; in BZ2_decompress()
531 uc = (UChar)(s->ll16[i]); in BZ2_decompress()
532 SET_LL(i, s->cftabCopy[uc]); in BZ2_decompress()
533 s->cftabCopy[uc]++; in BZ2_decompress()
537 i = s->origPtr; in BZ2_decompress()
545 while (i != s->origPtr); in BZ2_decompress()
547 s->tPos = s->origPtr; in BZ2_decompress()
548 s->nblock_used = 0; in BZ2_decompress()
549 if (s->blockRandomised) { in BZ2_decompress()
551 BZ_GET_SMALL(s->k0); s->nblock_used++; in BZ2_decompress()
552 BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; in BZ2_decompress()
554 BZ_GET_SMALL(s->k0); s->nblock_used++; in BZ2_decompress()
561 uc = (UChar)(s->tt[i] & 0xff); in BZ2_decompress()
562 s->tt[s->cftab[uc]] |= (i << 8); in BZ2_decompress()
563 s->cftab[uc]++; in BZ2_decompress()
566 s->tPos = s->tt[s->origPtr] >> 8; in BZ2_decompress()
567 s->nblock_used = 0; in BZ2_decompress()
568 if (s->blockRandomised) { in BZ2_decompress()
570 BZ_GET_FAST(s->k0); s->nblock_used++; in BZ2_decompress()
571 BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; in BZ2_decompress()
573 BZ_GET_FAST(s->k0); s->nblock_used++; in BZ2_decompress()
595 s->storedCombinedCRC = 0; in BZ2_decompress()
597 s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); in BZ2_decompress()
599 s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); in BZ2_decompress()
601 s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); in BZ2_decompress()
603 s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); in BZ2_decompress()
605 s->state = BZ_X_IDLE; in BZ2_decompress()
615 s->save_i = i; in BZ2_decompress()
616 s->save_j = j; in BZ2_decompress()
617 s->save_t = t; in BZ2_decompress()
618 s->save_alphaSize = alphaSize; in BZ2_decompress()
619 s->save_nGroups = nGroups; in BZ2_decompress()
620 s->save_nSelectors = nSelectors; in BZ2_decompress()
621 s->save_EOB = EOB; in BZ2_decompress()
622 s->save_groupNo = groupNo; in BZ2_decompress()
623 s->save_groupPos = groupPos; in BZ2_decompress()
624 s->save_nextSym = nextSym; in BZ2_decompress()
625 s->save_nblockMAX = nblockMAX; in BZ2_decompress()
626 s->save_nblock = nblock; in BZ2_decompress()
627 s->save_es = es; in BZ2_decompress()
628 s->save_N = N; in BZ2_decompress()
629 s->save_curr = curr; in BZ2_decompress()
630 s->save_zt = zt; in BZ2_decompress()
631 s->save_zn = zn; in BZ2_decompress()
632 s->save_zvec = zvec; in BZ2_decompress()
633 s->save_zj = zj; in BZ2_decompress()
634 s->save_gSel = gSel; in BZ2_decompress()
635 s->save_gMinlen = gMinlen; in BZ2_decompress()
636 s->save_gLimit = gLimit; in BZ2_decompress()
637 s->save_gBase = gBase; in BZ2_decompress()
638 s->save_gPerm = gPerm; in BZ2_decompress()