]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - SQUASHFS/squashfs-tools-4.4/squashfs-tools/zstd_wrapper.h
Fix the order issue in TreeView mode. (#3218)
[Ventoy.git] / SQUASHFS / squashfs-tools-4.4 / squashfs-tools / zstd_wrapper.h
1 #ifndef ZSTD_WRAPPER_H
2 #define ZSTD_WRAPPER_H
3 /*
4 * Squashfs
5 *
6 * Copyright (c) 2017
7 * Phillip Lougher <phillip@squashfs.org.uk>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2,
12 * or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * zstd_wrapper.h
20 *
21 */
22
23 #ifndef linux
24 #define __BYTE_ORDER BYTE_ORDER
25 #define __BIG_ENDIAN BIG_ENDIAN
26 #define __LITTLE_ENDIAN LITTLE_ENDIAN
27 #else
28 #include <endian.h>
29 #endif
30
31 #if __BYTE_ORDER == __BIG_ENDIAN
32 extern unsigned int inswap_le16(unsigned short);
33 extern unsigned int inswap_le32(unsigned int);
34
35 #define SQUASHFS_INSWAP_COMP_OPTS(s) { \
36 (s)->compression_level = inswap_le32((s)->compression_level); \
37 }
38 #else
39 #define SQUASHFS_INSWAP_COMP_OPTS(s)
40 #endif
41
42 /* Default compression */
43 #define ZSTD_DEFAULT_COMPRESSION_LEVEL 15
44
45 struct zstd_comp_opts {
46 int compression_level;
47 };
48 #endif