xref: /aosp_15_r20/external/lzma/CPP/7zip/Compress/PpmdEncoder.h (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1*f6dc9357SAndroid Build Coastguard Worker // PpmdEncoder.h
2*f6dc9357SAndroid Build Coastguard Worker 
3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_COMPRESS_PPMD_ENCODER_H
4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_COMPRESS_PPMD_ENCODER_H
5*f6dc9357SAndroid Build Coastguard Worker 
6*f6dc9357SAndroid Build Coastguard Worker #include "../../../C/Ppmd7.h"
7*f6dc9357SAndroid Build Coastguard Worker 
8*f6dc9357SAndroid Build Coastguard Worker #include "../../Common/MyCom.h"
9*f6dc9357SAndroid Build Coastguard Worker 
10*f6dc9357SAndroid Build Coastguard Worker #include "../ICoder.h"
11*f6dc9357SAndroid Build Coastguard Worker 
12*f6dc9357SAndroid Build Coastguard Worker #include "../Common/CWrappers.h"
13*f6dc9357SAndroid Build Coastguard Worker 
14*f6dc9357SAndroid Build Coastguard Worker namespace NCompress {
15*f6dc9357SAndroid Build Coastguard Worker namespace NPpmd {
16*f6dc9357SAndroid Build Coastguard Worker 
17*f6dc9357SAndroid Build Coastguard Worker struct CEncProps
18*f6dc9357SAndroid Build Coastguard Worker {
19*f6dc9357SAndroid Build Coastguard Worker   UInt32 MemSize;
20*f6dc9357SAndroid Build Coastguard Worker   UInt32 ReduceSize;
21*f6dc9357SAndroid Build Coastguard Worker   int Order;
22*f6dc9357SAndroid Build Coastguard Worker 
CEncPropsCEncProps23*f6dc9357SAndroid Build Coastguard Worker   CEncProps()
24*f6dc9357SAndroid Build Coastguard Worker   {
25*f6dc9357SAndroid Build Coastguard Worker     MemSize = (UInt32)(Int32)-1;
26*f6dc9357SAndroid Build Coastguard Worker     ReduceSize = (UInt32)(Int32)-1;
27*f6dc9357SAndroid Build Coastguard Worker     Order = -1;
28*f6dc9357SAndroid Build Coastguard Worker   }
29*f6dc9357SAndroid Build Coastguard Worker   void Normalize(int level);
30*f6dc9357SAndroid Build Coastguard Worker };
31*f6dc9357SAndroid Build Coastguard Worker 
32*f6dc9357SAndroid Build Coastguard Worker Z7_CLASS_IMP_COM_3(
33*f6dc9357SAndroid Build Coastguard Worker   CEncoder
34*f6dc9357SAndroid Build Coastguard Worker   , ICompressCoder
35*f6dc9357SAndroid Build Coastguard Worker   , ICompressSetCoderProperties
36*f6dc9357SAndroid Build Coastguard Worker   , ICompressWriteCoderProperties
37*f6dc9357SAndroid Build Coastguard Worker )
38*f6dc9357SAndroid Build Coastguard Worker   Byte *_inBuf;
39*f6dc9357SAndroid Build Coastguard Worker   CByteOutBufWrap _outStream;
40*f6dc9357SAndroid Build Coastguard Worker   CPpmd7 _ppmd;
41*f6dc9357SAndroid Build Coastguard Worker   CEncProps _props;
42*f6dc9357SAndroid Build Coastguard Worker public:
43*f6dc9357SAndroid Build Coastguard Worker   CEncoder();
44*f6dc9357SAndroid Build Coastguard Worker   ~CEncoder();
45*f6dc9357SAndroid Build Coastguard Worker };
46*f6dc9357SAndroid Build Coastguard Worker 
47*f6dc9357SAndroid Build Coastguard Worker }}
48*f6dc9357SAndroid Build Coastguard Worker 
49*f6dc9357SAndroid Build Coastguard Worker #endif
50