1 /* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */ 2 /* 3 * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd. 4 * Created by Huang Jianan <[email protected]> 5 */ 6 #ifndef __EROFS_DECOMPRESS_H 7 #define __EROFS_DECOMPRESS_H 8 9 #ifdef __cplusplus 10 extern "C" 11 { 12 #endif 13 14 #include "internal.h" 15 16 struct z_erofs_decompress_req { 17 struct erofs_sb_info *sbi; 18 char *in, *out; 19 20 /* 21 * initial decompressed bytes that need to be skipped 22 * when finally copying to output buffer 23 */ 24 unsigned int decodedskip; 25 unsigned int inputsize, decodedlength; 26 27 /* cut point of interlaced uncompressed data */ 28 unsigned int interlaced_offset; 29 30 /* indicate the algorithm will be used for decompression */ 31 unsigned int alg; 32 bool partial_decoding; 33 }; 34 35 int z_erofs_decompress(struct z_erofs_decompress_req *rq); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42