linux/lib/decompress.c

// SPDX-License-Identifier: GPL-2.0
/*
 * decompress.c
 *
 * Detect the decompression method based on magic number
 */

#include <linux/decompress/generic.h>

#include <linux/decompress/bunzip2.h>
#include <linux/decompress/unlzma.h>
#include <linux/decompress/unxz.h>
#include <linux/decompress/inflate.h>
#include <linux/decompress/unlzo.h>
#include <linux/decompress/unlz4.h>
#include <linux/decompress/unzstd.h>

#include <linux/types.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/printk.h>

#ifndef CONFIG_DECOMPRESS_GZIP
#define gunzip
#endif
#ifndef CONFIG_DECOMPRESS_BZIP2
#define bunzip2
#endif
#ifndef CONFIG_DECOMPRESS_LZMA
#define unlzma
#endif
#ifndef CONFIG_DECOMPRESS_XZ
#define unxz
#endif
#ifndef CONFIG_DECOMPRESS_LZO
#define unlzo
#endif
#ifndef CONFIG_DECOMPRESS_LZ4
#define unlz4
#endif
#ifndef CONFIG_DECOMPRESS_ZSTD
#define unzstd
#endif

struct compress_format {};

static const struct compress_format compressed_formats[] __initconst =;

decompress_fn __init decompress_method(const unsigned char *inbuf, long len,
				const char **name)
{}