Lines Matching refs:lzma2
41 * @XZ_MEMLIMIT_ERROR: A bigger LZMA2 dictionary would be needed than
108 * @dict_max: Maximum size of the LZMA2 dictionary (history buffer) for
109 * multi-call decoding. LZMA2 dictionary is always 2^n bytes
392 * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used
398 * Decode the LZMA2 properties (one byte) and reset the decoder. Return
406 /* Decode raw LZMA2 stream from b->in to b->out. */
487 * Decode raw BCJ + LZMA2 stream. This must be used only if there actually is
488 * a BCJ filter in the chain. If the chain has only LZMA2, xz_dec_lzma2_run()
492 struct xz_dec_lzma2 *lzma2,
609 * than what LZMA2 decoder takes, so it doesn't make sense to reduce
610 * stack usage here without doing that for the LZMA2 decoder too.
835 struct xz_dec_lzma2 *lzma2,
871 s->ret = xz_dec_lzma2_run(lzma2, b);
916 s->ret = xz_dec_lzma2_run(lzma2, b);
984 * LZMA2 decoder
990 * LZMA2 definitions
1427 struct lzma2_dec lzma2;
1979 * LZMA2 *
2000 if (s->temp.size > 0 || s->lzma2.compressed == 0) {
2002 if (tmp > s->lzma2.compressed - s->temp.size)
2003 tmp = s->lzma2.compressed - s->temp.size;
2009 if (s->temp.size + tmp == s->lzma2.compressed) {
2028 s->lzma2.compressed -= s->rc.in_pos;
2046 if (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED)
2047 s->rc.in_limit = b->in_pos + s->lzma2.compressed;
2055 if (in_avail > s->lzma2.compressed) return 0;
2057 s->lzma2.compressed -= in_avail;
2063 if (in_avail > s->lzma2.compressed)
2064 in_avail = s->lzma2.compressed;
2075 * Take care of the LZMA2 control layer, and forward the job of actual LZMA
2083 while (b->in_pos < b->in_size || s->lzma2.sequence == SEQ_LZMA_RUN) {
2084 switch (s->lzma2.sequence) {
2087 * LZMA2 control byte
2110 * A new LZMA2 stream must begin with a dictionary
2123 s->lzma2.need_props = 1;
2124 s->lzma2.need_dict_reset = 0;
2126 } else if (s->lzma2.need_dict_reset) {
2131 s->lzma2.uncompressed = (tmp & 0x1F) << 16;
2132 s->lzma2.sequence = SEQ_UNCOMPRESSED_1;
2140 s->lzma2.need_props = 0;
2141 s->lzma2.next_sequence
2144 } else if (s->lzma2.need_props) {
2148 s->lzma2.next_sequence
2157 s->lzma2.sequence = SEQ_COMPRESSED_0;
2158 s->lzma2.next_sequence = SEQ_COPY;
2164 s->lzma2.uncompressed
2166 s->lzma2.sequence = SEQ_UNCOMPRESSED_2;
2170 s->lzma2.uncompressed
2172 s->lzma2.sequence = SEQ_COMPRESSED_0;
2176 s->lzma2.compressed
2178 s->lzma2.sequence = SEQ_COMPRESSED_1;
2182 s->lzma2.compressed
2184 s->lzma2.sequence = s->lzma2.next_sequence;
2191 s->lzma2.sequence = SEQ_LZMA_PREPARE;
2194 if (s->lzma2.compressed < RC_INIT_BYTES)
2200 s->lzma2.compressed -= RC_INIT_BYTES;
2201 s->lzma2.sequence = SEQ_LZMA_RUN;
2211 * multiple times without changing s->lzma2.sequence.
2215 s->lzma2.uncompressed));
2219 s->lzma2.uncompressed -= dict_flush(&s->dict, b);
2221 if (s->lzma2.uncompressed == 0) {
2222 if (s->lzma2.compressed > 0 || s->lzma.len > 0
2227 s->lzma2.sequence = SEQ_CONTROL;
2232 < s->lzma2.compressed)) {
2239 dict_uncompressed(&s->dict, b, &s->lzma2.compressed);
2240 if (s->lzma2.compressed > 0)
2243 s->lzma2.sequence = SEQ_CONTROL;
2289 s->lzma2.sequence = SEQ_CONTROL;
2290 s->lzma2.need_dict_reset = 1;
2467 struct xz_dec_lzma2 *lzma2;
2561 ret = xz_dec_bcj_run(s->bcj, s->lzma2, b);
2564 ret = xz_dec_lzma2_run(s->lzma2, b);
2854 /* Filter ID = LZMA2 */
2862 /* Filter Properties contains LZMA2 dictionary size. */
2866 ret = xz_dec_lzma2_reset(s->lzma2, s->temp.buf[s->temp.pos++]);
3104 s->lzma2 = xz_dec_lzma2_create(dict_max);
3105 if (s->lzma2 == NULL)
3135 free((s->lzma2)->dict.buf);
3136 free(s->lzma2);