History

lib: Add zstd support to decompress

- 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.

Nick Terrell committed 6 years ago

Commit 4963bb21 parent 6d25a635 files · +366 −0Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/decompress/unzstd.h+11−0
@@ -0,0 +1,11 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef LINUX_DECOMPRESS_UNZSTD_H
3#define LINUX_DECOMPRESS_UNZSTD_H
4
5int 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