- Add unzstd() and the zstd decompress interface. - Add zstd support to decompress_method(). The decompress_method() and unzstd() functions are used to decompress the initramfs and the initrd. The __decompress() function is used in the preboot environment to decompress a zstd compressed kernel. The zstd decompression function allows the input and output buffers to overlap because that is used by x86 kernel decompression.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -0,0 +1,11 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +#ifndef LINUX_DECOMPRESS_UNZSTD_H | |
| 3 | +#define LINUX_DECOMPRESS_UNZSTD_H | |
| 4 | + | |
| 5 | +int unzstd(unsigned char *inbuf, long len, | |
| 6 | + long (*fill)(void*, unsigned long), | |
| 7 | + long (*flush)(void*, unsigned long), | |
| 8 | + unsigned char *output, | |
| 9 | + long *pos, | |
| 10 | + void (*error_fn)(char *x)); | |
| 11 | +#endif | |