1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020 Bootlin
5 * Author: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
8 #ifndef SQFS_DECOMPRESSOR_H
9 #define SQFS_DECOMPRESSOR_H
13 #define SQFS_COMP_ZLIB 1
14 #define SQFS_COMP_LZMA 2
15 #define SQFS_COMP_LZO 3
16 #define SQFS_COMP_XZ 4
17 #define SQFS_COMP_LZ4 5
18 #define SQFS_COMP_ZSTD 6
20 /* LZMA does not support any compression options */
22 struct squashfs_gzip_opts {
23 u32 compression_level;
28 struct squashfs_xz_opts {
30 u32 executable_filters;
33 struct squashfs_lz4_opts {
38 struct squashfs_zstd_opts {
39 u32 compression_level;
42 struct squashfs_lzo_opts {
47 union squashfs_compression_opts {
48 struct squashfs_gzip_opts *gzip;
49 struct squashfs_xz_opts *xz;
50 struct squashfs_lz4_opts *lz4;
51 struct squashfs_zstd_opts *zstd;
52 struct squashfs_lzo_opts *lzo;
55 int sqfs_decompress(u16 comp_type, void *dest, unsigned long *dest_len,
56 void *source, u32 lenp);
58 #endif /* SQFS_DECOMPRESSOR_H */