Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 2 | /* |
Luigi 'Comio' Mantellini | caf72ff | 2009-07-21 10:45:49 +0200 | [diff] [blame] | 3 | * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65 |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 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 |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __LZMA_TOOL_H__ |
| 12 | #define __LZMA_TOOL_H__ |
| 13 | |
Luigi 'Comio' Mantellini | caf72ff | 2009-07-21 10:45:49 +0200 | [diff] [blame] | 14 | #include <lzma/LzmaTypes.h> |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 15 | |
Simon Glass | ccfc9d7 | 2022-02-28 12:08:25 -0700 | [diff] [blame^] | 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 | |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 31 | #endif |