Prepare v2023.10
[platform/kernel/u-boot.git] / lib / lzma / LzmaTools.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
4  *
5  * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
6  * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com)
7  *
8  * Copyright (C) 1999-2005 Igor Pavlov
9  */
10
11 #ifndef __LZMA_TOOL_H__
12 #define __LZMA_TOOL_H__
13
14 #include <lzma/LzmaTypes.h>
15
16 /**
17  * lzmaBuffToBuffDecompress() - Decompress LZMA data
18  *
19  * @outStream: output buffer
20  * @uncompressedSize: On entry, the mnaximum uncompressed size of the data;
21  *      on exit, the actual uncompressed size after processing
22  * @inStream: Compressed bytes to decompress
23  * @length: Sizeof @inStream
24  * @return 0 if OK, SZ_ERROR_DATA if the data is in a format that cannot be
25  *      decompressed; SZ_ERROR_OUTPUT_EOF if *uncompressedSize is too small;
26  *      see also other SZ_ERROR... values
27  */
28 int lzmaBuffToBuffDecompress(unsigned char *outStream, SizeT *uncompressedSize,
29                              const unsigned char *inStream, SizeT length);
30
31 #endif