1#ifndef DECOMPRESSOR_H
2#define DECOMPRESSOR_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26struct squashfs_decompressor {
27 void *(*init)(struct squashfs_sb_info *, void *);
28 void *(*comp_opts)(struct squashfs_sb_info *, void *, int);
29 void (*free)(void *);
30 int (*decompress)(struct squashfs_sb_info *, void *,
31 struct buffer_head **, int, int, int,
32 struct squashfs_page_actor *);
33 int id;
34 char *name;
35 int supported;
36};
37
38static inline void *squashfs_comp_opts(struct squashfs_sb_info *msblk,
39 void *buff, int length)
40{
41 return msblk->decompressor->comp_opts ?
42 msblk->decompressor->comp_opts(msblk, buff, length) : NULL;
43}
44
45#ifdef CONFIG_SQUASHFS_XZ
46extern const struct squashfs_decompressor squashfs_xz_comp_ops;
47#endif
48
49#ifdef CONFIG_SQUASHFS_LZ4
50extern const struct squashfs_decompressor squashfs_lz4_comp_ops;
51#endif
52
53#ifdef CONFIG_SQUASHFS_LZO
54extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
55#endif
56
57#ifdef CONFIG_SQUASHFS_ZLIB
58extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
59#endif
60
61#ifdef CONFIG_SQUASHFS_ZSTD
62extern const struct squashfs_decompressor squashfs_zstd_comp_ops;
63#endif
64
65#endif
66