7 #include "LZMADecoder.h"
10 static LzmaDecoder cc
;
11 ISequentialInStream in_stream
;
12 ISequentialOutStream out_stream
;
13 int decompress_lzma_7z( unsigned char* in_data
,
15 unsigned char* out_data
,
19 UINT64 in_size_l
= in_size
;
20 UINT64 out_size_l
= out_size
;
23 InStreamInit(in_data
, in_size
);
25 OutStreamInit((char *)out_data
, out_size
);
27 LzmaDecoderConstructor(&cc
);
29 if ((RC
= LzmaDecoderReadCoderProperties(&cc
)) != S_OK
)
34 if (LzmaDecoderCode(&cc
, &in_size_l
, &out_size_l
) != S_OK
)
39 if (out_stream
.size
!= out_size
)
44 if ( out_stream
.overflow
)
54 EXPORT_SYMBOL(decompress_lzma_7z
);