1/* LzmaRamDecode.h */ 2 3#ifndef __LzmaRamDecode_h 4#define __LzmaRamDecode_h 5 6#include <stdlib.h> 7 8/* 9LzmaRamGetUncompressedSize: 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 18*/ 19 20int LzmaRamGetUncompressedSize( 21 const unsigned char *inBuffer, 22 size_t inSize, 23 size_t *outSize); 24 25 26/* 27LzmaRamDecompress: 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 41 42Memory requirements depend from properties of LZMA stream. 43With default lzma settings it's about 16 KB. 44*/ 45 46int 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 *)); 54 55#endif 56