Lines Matching refs:cst
350 struct cstate *cst, uint16_t *p,
361 if (cst->state >= LZMA_NUM_LIT_STATES) {
362 int match_byte = peek_old_byte(wr, cst->rep0);
383 if (cst->state < 4)
384 cst->state = 0;
385 else if (cst->state < 10)
386 cst->state -= 3;
388 cst->state -= 6;
394 struct cstate *cst, uint16_t *p,
402 prob = p + LZMA_IS_REP + cst->state;
405 cst->rep3 = cst->rep2;
406 cst->rep2 = cst->rep1;
407 cst->rep1 = cst->rep0;
408 cst->state = cst->state < LZMA_NUM_LIT_STATES ? 0 : 3;
412 prob = p + LZMA_IS_REP_G0 + cst->state;
416 + (cst->state <<
422 cst->state = cst->state < LZMA_NUM_LIT_STATES ?
424 return copy_byte(wr, cst->rep0);
432 prob = p + LZMA_IS_REP_G1 + cst->state;
435 distance = cst->rep1;
438 prob = p + LZMA_IS_REP_G2 + cst->state;
441 distance = cst->rep2;
444 distance = cst->rep3;
445 cst->rep3 = cst->rep2;
447 cst->rep2 = cst->rep1;
449 cst->rep1 = cst->rep0;
450 cst->rep0 = distance;
452 cst->state = cst->state < LZMA_NUM_LIT_STATES ? 8 : 11;
486 if (cst->state < 4) {
489 cst->state += LZMA_NUM_LIT_STATES;
502 cst->rep0 = 2 | (pos_slot & 1);
504 cst->rep0 <<= num_bits;
506 cst->rep0 - pos_slot - 1;
510 cst->rep0 = (cst->rep0 << 1) |
513 cst->rep0 <<= LZMA_NUM_ALIGN_BITS;
520 cst->rep0 |= i;
524 cst->rep0 = pos_slot;
525 if (++(cst->rep0) == 0)
527 if (cst->rep0 > wr->header->dict_size
528 || cst->rep0 > get_pos(wr))
534 return copy_bytes(wr, cst->rep0, len);
556 struct cstate cst;
571 cst.state = 0;
572 cst.rep0 = cst.rep1 = cst.rep2 = cst.rep3 = 1;
636 (cst.state << LZMA_NUM_POS_BITS_MAX) + pos_state;
638 if (process_bit0(&wr, &rc, &cst, p, pos_state, prob,
644 if (process_bit1(&wr, &rc, &cst, p, pos_state, prob)) {
648 if (cst.rep0 == 0)