aboutsummaryrefslogtreecommitdiff
path: root/include/erofs/decompress.h
blob: 3d0d9633865da2ae6cb90cee23b9a5c1087b5e79 (plain)
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
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C), 2008-2020, OPPO Mobile Comm Corp., Ltd.
 * Created by Huang Jianan <huangjianan@oppo.com>
 */
#ifndef __EROFS_DECOMPRESS_H
#define __EROFS_DECOMPRESS_H

#include "internal.h"

struct z_erofs_decompress_req {
	char *in, *out;

	/*
	 * initial decompressed bytes that need to be skipped
	 * when finally copying to output buffer
	 */
	unsigned int decodedskip;
	unsigned int inputsize, decodedlength;

	/* indicate the algorithm will be used for decompression */
	unsigned int alg;
	bool partial_decoding;
};

int z_erofs_decompress(struct z_erofs_decompress_req *rq);

#endif