Lines Matching +full:no +full:- +full:output
1 /* SPDX-License-Identifier: 0BSD */
7 * Igor Pavlov <https://7-zip.org/>
22 * enum xz_mode - Operation mode
24 * @XZ_SINGLE: Single-call mode. This uses less RAM than
25 * multi-call modes, because the LZMA2
30 * @XZ_PREALLOC: Multi-call mode with preallocated LZMA2
34 * @XZ_DYNALLOC: Multi-call mode. The LZMA2 dictionary is
53 * enum xz_ret - Return codes
55 * output space is required to continue. This
56 * return code is possible only in multi-call mode
60 * is still possible in multi-call mode by simply
70 * tried to be allocated was no more than the
75 * only in multi-call mode (XZ_PREALLOC or
76 * XZ_DYNALLOC); the single-call mode (XZ_SINGLE)
86 * different between multi-call and single-call
89 * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls
90 * to XZ code cannot consume any input and cannot produce any new output.
91 * This happens when there is no new input available, or the output buffer
92 * is full while at least one output byte is still pending. Assuming your
96 * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer
98 * decoder produce more output than the caller expected. When it is
115 * struct xz_buf - Passing input and output buffers to XZ code
121 * @out: Beginning of the output buffer. This may be NULL if and only
123 * @out_pos: Current position in the output buffer. This must not exceed
125 * @out_size: Size of the output buffer
127 * Only the contents of the output buffer from out[out_pos] onward, and
141 * struct xz_dec - Opaque type to hold the XZ decoder state
146 * xz_dec_init() - Allocate and initialize a XZ decoder state
149 * multi-call decoding. This is ignored in single-call mode
151 * or 2^n + 2^(n-1) bytes (the latter sizes are less common
158 * Single-call mode (XZ_SINGLE): xz_dec_run() decodes the whole stream at
159 * once. The caller must provide enough output space or the decoding will
160 * fail. The output space is used as the dictionary buffer, which is why
161 * there is no need to allocate the dictionary as part of the decoder's
164 * Because the output buffer is used as the workspace, streams encoded using
165 * a big dictionary are not a problem in single-call mode. It is enough that
166 * the output buffer is big enough to hold the actual uncompressed data; it
169 * Multi-call mode with preallocated dictionary (XZ_PREALLOC): dict_max bytes
170 * of memory is preallocated for the LZMA2 dictionary. This way there is no
177 * Multi-call mode with dynamically allocated dictionary (XZ_DYNALLOC):
191 * xz_dec_run() - Run the XZ decoder
193 * @b: Input and output buffers
198 * Note that if an error occurs in single-call mode (return value is not
199 * XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the
200 * contents of the output buffer from b->out[b->out_pos] onward are
202 * chains, there may be a second pass over the output buffer, and this pass
203 * cannot be properly done if the output buffer is truncated. Thus, you
204 * cannot give the single-call decoder a too small buffer and then expect to
206 * the multi-call decoder if you don't want to uncompress the whole stream.
211 * xz_dec_reset() - Reset an already allocated decoder state
214 * This function can be used to reset the multi-call decoder state without
217 * In single-call mode, xz_dec_reset() is always called in the beginning of
219 * multi-call mode.
224 * xz_dec_end() - Free the memory allocated for the decoder state
237 * whose first byte (always 0x00) has been replaced with bitwise-negation
240 * Just like with LZMA2, lc + lp <= 4 must be true. The LZMA end-of-stream
245 * struct xz_dec_microlzma - Opaque type to hold the MicroLZMA decoder state
250 * xz_dec_microlzma_alloc() - Allocate memory for the MicroLZMA decoder
270 * xz_dec_microlzma_reset() - Reset the MicroLZMA decoder state
287 * xz_dec_microlzma_run() - Run the MicroLZMA decoder
289 * @b: Input and output buffers
295 * XZ_DATA_ERROR. This function cannot return XZ_BUF_ERROR: if no progress
296 * is possible due to lack of input data or output space, this function will
298 * will eventually provide input and output space matching (or exceeding)
308 * With XZ_PREALLOC only: As an extra feature, b->out may be NULL to skip over
310 * output buffer for the bytes that will be ignored.
313 * is also possible and thus XZ_SINGLE is actually a limited multi-call mode.
314 * After XZ_OK the bytes decoded so far may be read from the output buffer.
315 * It is possible to continue decoding but the variables b->out and b->out_pos
316 * MUST NOT be changed by the caller. Increasing the value of b->out_size is
317 * allowed to make more output space available; one doesn't need to provide
320 * provided from non-contiguous memory.
325 * xz_dec_microlzma_end() - Free the memory allocated for the decoder state
332 * Standalone build (userspace build or in-kernel build for boot time use)
333 * needs a CRC32 implementation. For normal in-kernel use, kernel's own
353 * Update CRC32 value using the polynomial from IEEE-802.3. To start a new