allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / scripts / squashfs / lzma / C / 7zip / Compress / LZMA_Alone / LzmaRam.h
blob74d584d22b4a37a1cfa3b53687a2e2a83d77f104
1 // LzmaRam.h
3 #ifndef __LzmaRam_h
4 #define __LzmaRam_h
6 #include <stdlib.h>
7 #include "../../../Common/Types.h"
9 /*
10 LzmaRamEncode: BCJ + LZMA RAM->RAM compressing.
11 It uses .lzma format, but it writes one additional byte to .lzma file:
12 0: - no filter
13 1: - x86(BCJ) filter.
15 To provide best compression ratio dictionarySize mustbe >= inSize
17 LzmaRamEncode allocates Data with MyAlloc/BigAlloc functions.
18 RAM Requirements:
19 RamSize = dictionarySize * 9.5 + 6MB + FilterBlockSize
20 FilterBlockSize = 0, if useFilter == false
21 FilterBlockSize = inSize, if useFilter == true
23 Return code:
24 0 - OK
25 1 - Unspecified Error
26 2 - Memory allocating error
27 3 - Output buffer OVERFLOW
29 If you use SZ_FILTER_AUTO mode, then encoder will use 2 or 3 passes:
30 2 passes when FILTER_NO provides better compression.
31 3 passes when FILTER_YES provides better compression.
34 enum ESzFilterMode
36 SZ_FILTER_NO,
37 SZ_FILTER_YES,
38 SZ_FILTER_AUTO
41 int LzmaRamEncode(
42 const Byte *inBuffer, size_t inSize,
43 Byte *outBuffer, size_t outSize, size_t *outSizeProcessed,
44 UInt32 dictionarySize, ESzFilterMode filterMode);
46 #endif