File: compress_hints.h

package info (click to toggle)
erofs-utils 1.9-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 1,484 kB
  • sloc: ansic: 28,409; makefile: 203; sh: 33
file content (36 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
/*
 * Copyright (C), 2008-2021, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <huangjianan@oppo.com>
 */
#ifndef __EROFS_COMPRESS_HINTS_H
#define __EROFS_COMPRESS_HINTS_H

#ifdef __cplusplus
extern "C"
{
#endif

#include <sys/types.h>
#include <regex.h>
#include "erofs/importer.h"

struct erofs_compress_hints {
	struct list_head list;

	regex_t reg;
	unsigned int physical_clusterblks;
	unsigned char algorithmtype;
};

bool z_erofs_apply_compress_hints(struct erofs_importer *im,
				  struct erofs_inode *inode);
void erofs_cleanup_compress_hints(void);
int erofs_load_compress_hints(struct erofs_importer *im,
			      struct erofs_sb_info *sbi);

#ifdef __cplusplus
}
#endif

#endif