1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Squashfs - a compressed read only filesystem for Linux
7 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
8 * Phillip Lougher <phillip@squashfs.org.uk>
13 struct squashfs_decompressor {
14 void *(*init)(struct squashfs_sb_info *, void *);
15 void *(*comp_opts)(struct squashfs_sb_info *, void *, int);
17 int (*decompress)(struct squashfs_sb_info *, void *,
18 struct buffer_head **, int, int, int,
19 struct squashfs_page_actor *);
25 static inline void *squashfs_comp_opts(struct squashfs_sb_info *msblk,
26 void *buff, int length)
28 return msblk->decompressor->comp_opts ?
29 msblk->decompressor->comp_opts(msblk, buff, length) : NULL;
32 #ifdef CONFIG_SQUASHFS_XZ
33 extern const struct squashfs_decompressor squashfs_xz_comp_ops;
36 #ifdef CONFIG_SQUASHFS_LZ4
37 extern const struct squashfs_decompressor squashfs_lz4_comp_ops;
40 #ifdef CONFIG_SQUASHFS_LZO
41 extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
44 #ifdef CONFIG_SQUASHFS_ZLIB
45 extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
48 #ifdef CONFIG_SQUASHFS_ZSTD
49 extern const struct squashfs_decompressor squashfs_zstd_comp_ops;