Lines Matching refs:lzma
1422 struct lzma_dec lzma; member
1717 uint32_t low = prev_byte >> (8 - s->lzma.lc); in lzma_literal_probs()
1718 uint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc; in lzma_literal_probs()
1719 return s->lzma.literal[low + high]; in lzma_literal_probs()
1734 if (lzma_state_is_literal(s->lzma.state)) { in lzma_literal()
1738 match_byte = dict_get(&s->dict, s->lzma.rep0) << 1; in lzma_literal()
1757 lzma_state_literal(&s->lzma.state); in lzma_literal()
1770 s->lzma.len = MATCH_LEN_MIN; in lzma_len()
1775 s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS; in lzma_len()
1779 s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS in lzma_len()
1784 s->lzma.len += rc_bittree(&s->rc, probs, limit) - limit; in lzma_len()
1794 lzma_state_match(&s->lzma.state); in lzma_match()
1796 s->lzma.rep3 = s->lzma.rep2; in lzma_match()
1797 s->lzma.rep2 = s->lzma.rep1; in lzma_match()
1798 s->lzma.rep1 = s->lzma.rep0; in lzma_match()
1800 lzma_len(s, &s->lzma.match_len_dec, pos_state); in lzma_match()
1802 probs = s->lzma.dist_slot[lzma_get_dist_state(s->lzma.len)]; in lzma_match()
1806 s->lzma.rep0 = dist_slot; in lzma_match()
1809 s->lzma.rep0 = 2 + (dist_slot & 1); in lzma_match()
1812 s->lzma.rep0 <<= limit; in lzma_match()
1813 probs = s->lzma.dist_special + s->lzma.rep0 in lzma_match()
1816 &s->lzma.rep0, limit); in lzma_match()
1818 rc_direct(&s->rc, &s->lzma.rep0, limit - ALIGN_BITS); in lzma_match()
1819 s->lzma.rep0 <<= ALIGN_BITS; in lzma_match()
1820 rc_bittree_reverse(&s->rc, s->lzma.dist_align, in lzma_match()
1821 &s->lzma.rep0, ALIGN_BITS); in lzma_match()
1834 if (!rc_bit(&s->rc, &s->lzma.is_rep0[s->lzma.state])) { in lzma_rep_match()
1835 if (!rc_bit(&s->rc, &s->lzma.is_rep0_long[ in lzma_rep_match()
1836 s->lzma.state][pos_state])) { in lzma_rep_match()
1837 lzma_state_short_rep(&s->lzma.state); in lzma_rep_match()
1838 s->lzma.len = 1; in lzma_rep_match()
1842 if (!rc_bit(&s->rc, &s->lzma.is_rep1[s->lzma.state])) { in lzma_rep_match()
1843 tmp = s->lzma.rep1; in lzma_rep_match()
1845 if (!rc_bit(&s->rc, &s->lzma.is_rep2[s->lzma.state])) { in lzma_rep_match()
1846 tmp = s->lzma.rep2; in lzma_rep_match()
1848 tmp = s->lzma.rep3; in lzma_rep_match()
1849 s->lzma.rep3 = s->lzma.rep2; in lzma_rep_match()
1852 s->lzma.rep2 = s->lzma.rep1; in lzma_rep_match()
1855 s->lzma.rep1 = s->lzma.rep0; in lzma_rep_match()
1856 s->lzma.rep0 = tmp; in lzma_rep_match()
1859 lzma_state_long_rep(&s->lzma.state); in lzma_rep_match()
1860 lzma_len(s, &s->lzma.rep_len_dec, pos_state); in lzma_rep_match()
1872 if (dict_has_space(&s->dict) && s->lzma.len > 0) in lzma_main()
1873 dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0); in lzma_main()
1880 pos_state = s->dict.pos & s->lzma.pos_mask; in lzma_main()
1882 if (!rc_bit(&s->rc, &s->lzma.is_match[ in lzma_main()
1883 s->lzma.state][pos_state])) { in lzma_main()
1886 if (rc_bit(&s->rc, &s->lzma.is_rep[s->lzma.state])) in lzma_main()
1891 if (!dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0)) in lzma_main()
1914 s->lzma.state = STATE_LIT_LIT; in lzma_reset()
1915 s->lzma.rep0 = 0; in lzma_reset()
1916 s->lzma.rep1 = 0; in lzma_reset()
1917 s->lzma.rep2 = 0; in lzma_reset()
1918 s->lzma.rep3 = 0; in lzma_reset()
1929 probs = s->lzma.is_match[0]; in lzma_reset()
1946 s->lzma.pos_mask = 0; in lzma_props()
1949 ++s->lzma.pos_mask; in lzma_props()
1952 s->lzma.pos_mask = (1 << s->lzma.pos_mask) - 1; in lzma_props()
1954 s->lzma.literal_pos_mask = 0; in lzma_props()
1957 ++s->lzma.literal_pos_mask; in lzma_props()
1960 s->lzma.lc = props; in lzma_props()
1962 if (s->lzma.lc + s->lzma.literal_pos_mask > 4) in lzma_props()
1965 s->lzma.literal_pos_mask = (1 << s->lzma.literal_pos_mask) - 1; in lzma_props()
2215 if (s->lzma2.compressed > 0 || s->lzma.len > 0 in xz_dec_lzma2_run()
2280 s->lzma.len = 0; in xz_dec_lzma2_reset()