#include <cafe.h> #include <lzmalib.h> MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, const unsigned char *props, size_t propsSize);
dest | Output data. | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
destLen |
In: output data size. Out: processed output size. |
|||||||||
src | Input data. | |||||||||
srcLen |
In: Input data size. Out: processed input size. |
|||||||||
props |
Pointer to a 5-byte buffer containing the LZMA compression properties from LzmaCompress .
|
|||||||||
propsSize |
Size of properties in props buffer; propsSize = LZMA_PROPS_SIZE = 5.
|
SZ_OK |
OK. |
---|---|
SZ_ERROR_DATA |
Data error. |
SZ_ERROR_MEM |
Memory allocation error. |
SZ_UNSUPPORTED |
Unsupported properties. |
SZ_ERROR_INPUT_EOF |
Input src is too short. |
Decompress the data referenced by src into the buffer referenced by dest using the LZMA decompression algorithm from the public domain
LZMALIB version 9.20 that is available at www.7-zip.org (http://www.7-zip.org/download.html
).
For decompression, dictSize + state_size is required, where state_size = (4 + (1.5 << (lc + lp))) KB. By default (lc=3, lp=0), state_size = 16 KB.
There is a demonstration of the usage of compression and decompression in the demo folder:
$CAFE_ROOT/system/src/demo/uselzma
A demonstration involving the parsing and extraction from a 7-Zip file created in Windows is in the demo folder:
$CAFE_ROOT/system/src/demo/szfile
None.
2014/11/07 Initial version.
CONFIDENTIAL