RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / scripts / squashfs / lzma / C / 7zip / Compress / LZMA_Alone / LzmaRamDecode.h
blob783734a44fe8b34674da40e70a5501320591d77f
1 /* LzmaRamDecode.h */
3 #ifndef __LzmaRamDecode_h
4 #define __LzmaRamDecode_h
6 #include <stdlib.h>
8 /*
9 LzmaRamGetUncompressedSize:
10 In:
11 inBuffer - input data
12 inSize - input data size
13 Out:
14 outSize - uncompressed size
15 Return code:
16 0 - OK
17 1 - Error in headers
20 int LzmaRamGetUncompressedSize(
21 const unsigned char *inBuffer,
22 size_t inSize,
23 size_t *outSize);
27 LzmaRamDecompress:
28 In:
29 inBuffer - input data
30 inSize - input data size
31 outBuffer - output data
32 outSize - output size
33 allocFunc - alloc function (can be malloc)
34 freeFunc - free function (can be free)
35 Out:
36 outSizeProcessed - processed size
37 Return code:
38 0 - OK
39 1 - Error in headers / data stream
40 2 - Memory allocating error
42 Memory requirements depend from properties of LZMA stream.
43 With default lzma settings it's about 16 KB.
46 int LzmaRamDecompress(
47 const unsigned char *inBuffer,
48 size_t inSize,
49 unsigned char *outBuffer,
50 size_t outSize,
51 size_t *outSizeProcessed,
52 void * (*allocFunc)(size_t size),
53 void (*freeFunc)(void *));
55 #endif