]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - fs/squashfs/decompressor.h
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi...
[mirror_ubuntu-jammy-kernel.git] / fs / squashfs / decompressor.h
CommitLineData
68252eb5 1/* SPDX-License-Identifier: GPL-2.0-or-later */
4c0f0bb2
PL
2#ifndef DECOMPRESSOR_H
3#define DECOMPRESSOR_H
4/*
5 * Squashfs - a compressed read only filesystem for Linux
6 *
7 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
d7f2ff67 8 * Phillip Lougher <phillip@squashfs.org.uk>
4c0f0bb2 9 *
4c0f0bb2
PL
10 * decompressor.h
11 */
12
13struct squashfs_decompressor {
9508c6b9
PL
14 void *(*init)(struct squashfs_sb_info *, void *);
15 void *(*comp_opts)(struct squashfs_sb_info *, void *, int);
4c0f0bb2 16 void (*free)(void *);
846b730e
PL
17 int (*decompress)(struct squashfs_sb_info *, void *,
18 struct buffer_head **, int, int, int,
19 struct squashfs_page_actor *);
4c0f0bb2
PL
20 int id;
21 char *name;
22 int supported;
23};
24
9508c6b9
PL
25static inline void *squashfs_comp_opts(struct squashfs_sb_info *msblk,
26 void *buff, int length)
4c0f0bb2 27{
9508c6b9
PL
28 return msblk->decompressor->comp_opts ?
29 msblk->decompressor->comp_opts(msblk, buff, length) : NULL;
4c0f0bb2 30}
7a43ae52
PL
31
32#ifdef CONFIG_SQUASHFS_XZ
33extern const struct squashfs_decompressor squashfs_xz_comp_ops;
34#endif
35
62421645
PL
36#ifdef CONFIG_SQUASHFS_LZ4
37extern const struct squashfs_decompressor squashfs_lz4_comp_ops;
38#endif
39
01a678c5
PL
40#ifdef CONFIG_SQUASHFS_LZO
41extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
42#endif
43
cc6d3497
PL
44#ifdef CONFIG_SQUASHFS_ZLIB
45extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
46#endif
47
87bf54bb
SP
48#ifdef CONFIG_SQUASHFS_ZSTD
49extern const struct squashfs_decompressor squashfs_zstd_comp_ops;
50#endif
51
4c0f0bb2 52#endif