1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * erofs-utils/include/erofs/compress.h
4  *
5  * Copyright (C) 2019 HUAWEI, Inc.
6  *             http://www.huawei.com/
7  * Created by Gao Xiang <gaoxiang25@huawei.com>
8  */
9 #ifndef __EROFS_COMPRESS_H
10 #define __EROFS_COMPRESS_H
11 
12 #include "internal.h"
13 
14 /* workaround for an upstream lz4 compression issue, which can crash us */
15 /* #define EROFS_CONFIG_COMPR_MAX_SZ        (1024 * 1024) */
16 #define EROFS_CONFIG_COMPR_MAX_SZ           (900  * 1024)
17 #define EROFS_CONFIG_COMPR_MIN_SZ           (32   * 1024)
18 
19 int erofs_write_compressed_file(struct erofs_inode *inode);
20 
21 int z_erofs_compress_init(void);
22 int z_erofs_compress_exit(void);
23 
24 const char *z_erofs_list_available_compressors(unsigned int i);
25 
26 #endif
27 
28