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