xref: /aosp_15_r20/external/lzma/CPP/7zip/Compress/BranchMisc.h (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1 // BranchMisc.h
2 
3 #ifndef ZIP7_INC_COMPRESS_BRANCH_MISC_H
4 #define ZIP7_INC_COMPRESS_BRANCH_MISC_H
5 #include "../../../C/Bra.h"
6 
7 #include "../../Common/MyCom.h"
8 
9 #include "../ICoder.h"
10 
11 namespace NCompress {
12 namespace NBranch {
13 
Z7_CLASS_IMP_COM_1(CCoder,ICompressFilter)14 Z7_CLASS_IMP_COM_1(
15   CCoder
16   , ICompressFilter
17 )
18   UInt32 _pc;
19   z7_Func_BranchConv BraFunc;
20 public:
21   CCoder(z7_Func_BranchConv bra): _pc(0), BraFunc(bra) {}
22 };
23 
24 #ifndef Z7_EXTRACT_ONLY
25 
Z7_CLASS_IMP_COM_3(CEncoder,ICompressFilter,ICompressSetCoderProperties,ICompressWriteCoderProperties)26 Z7_CLASS_IMP_COM_3(
27   CEncoder
28   , ICompressFilter
29   , ICompressSetCoderProperties
30   , ICompressWriteCoderProperties
31 )
32   UInt32 _pc;
33   UInt32 _pc_Init;
34   UInt32 _alignment;
35   z7_Func_BranchConv BraFunc;
36 public:
37   CEncoder(z7_Func_BranchConv bra, UInt32 alignment):
38       _pc(0), _pc_Init(0), _alignment(alignment), BraFunc(bra) {}
39 };
40 
41 #endif
42 
43 Z7_CLASS_IMP_COM_2(
44   CDecoder
45   , ICompressFilter
46   , ICompressSetDecoderProperties2
47 )
48   UInt32 _pc;
49   UInt32 _pc_Init;
50   UInt32 _alignment;
51   z7_Func_BranchConv BraFunc;
52 public:
CDecoder(z7_Func_BranchConv bra,UInt32 alignment)53   CDecoder(z7_Func_BranchConv bra, UInt32 alignment):
54       _pc(0), _pc_Init(0), _alignment(alignment), BraFunc(bra) {}
55 };
56 
57 }}
58 
59 #endif
60