xref: /aosp_15_r20/external/erofs-utils/include/erofs/compress_hints.h (revision 33b1fccf6a0fada2c2875d400ed01119b7676ee5)
1 /* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
2 /*
3  * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
4  * Created by Huang Jianan <[email protected]>
5  */
6 #ifndef __EROFS_COMPRESS_HINTS_H
7 #define __EROFS_COMPRESS_HINTS_H
8 
9 #ifdef __cplusplus
10 extern "C"
11 {
12 #endif
13 
14 #include "erofs/internal.h"
15 #include <sys/types.h>
16 #include <regex.h>
17 
18 struct erofs_compress_hints {
19 	struct list_head list;
20 
21 	regex_t reg;
22 	unsigned int physical_clusterblks;
23 	unsigned char algorithmtype;
24 };
25 
26 bool z_erofs_apply_compress_hints(struct erofs_inode *inode);
27 void erofs_cleanup_compress_hints(void);
28 int erofs_load_compress_hints(struct erofs_sb_info *sbi);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif
35