Lines Matching +full:multi +full:- +full:block

1 // SPDX-License-Identifier: 0BSD
4 * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd
10 * Important notes about in-place decompression
20 * The worst case for in-place decompression is that the beginning of
22 * incompressible. Thus, we must look for worst-case expansion when the
29 * Block Header:
30 * Block Header (8-12)
32 * Block Padding (0-3)
34 * Index (8-20)
37 * Normally there is exactly one Block, but let's assume that there are
38 * 2-4 Blocks just in case. Because Stream Header and also Block Header
39 * of the first Block don't make the decompressor produce any uncompressed
40 * data, we can ignore them from our calculations. Block Headers of possible
73 * - 128 bytes for the .xz file format headers;
74 * - 8 bytes per every 32 KiB of uncompressed size (one LZMA2 chunk header
76 * - 64 KiB (biggest possible LZMA2 chunk payload size) to make sure that
90 * Thus, when updating Deflate-only in-place kernel decompressor to
97 * decompression (pre-boot code). <linux/decompress/mm.h> will define
157 * when XZ_DYNALLOC is used, but the pre-boot free() doesn't support it.
170 * FIXME: Not all basic memory functions are provided in architecture-specific
175 * is fast enough. memcpy/memmove speed matters in multi-call mode, but
176 * the kernel image is decompressed in single-call mode, in which only
222 while (i-- > 0) in memmove()
247 /* Size of the input and output buffers in multi-call mode */
253 * This wrapper will automatically choose single-call or multi-call mode
254 * of the native XZ decoder API. The single-call mode can be used only when
279 s = xz_dec_init(XZ_DYNALLOC, (uint32_t)-1); in unxz()
286 b.out_size = (size_t)-1; in unxz()
363 /* This can occur only in multi-call mode. */ in unxz()
378 error("XZ-compressed data is corrupt"); in unxz()
386 return -1; in unxz()
397 return -1; in unxz()
401 * This function is used by architecture-specific files to decompress