8 // "23170F69-40C1-278A-0000-000400xx0000"
9 #define CODER_INTERFACE(i, x) \
10 DEFINE_GUID(IID_ ## i, \
11 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \
12 struct i: public IUnknown
14 CODER_INTERFACE(ICompressProgressInfo
, 0x04)
16 STDMETHOD(SetRatioInfo
)(const UInt64
*inSize
, const UInt64
*outSize
) PURE
;
19 CODER_INTERFACE(ICompressCoder
, 0x05)
21 STDMETHOD(Code
)(ISequentialInStream
*inStream
,
22 ISequentialOutStream
*outStream
,
24 const UInt64
*outSize
,
25 ICompressProgressInfo
*progress
) PURE
;
28 CODER_INTERFACE(ICompressCoder2
, 0x18)
30 STDMETHOD(Code
)(ISequentialInStream
**inStreams
,
31 const UInt64
**inSizes
,
33 ISequentialOutStream
**outStreams
,
34 const UInt64
**outSizes
,
36 ICompressProgressInfo
*progress
) PURE
;
39 namespace NCoderPropID
43 kDictionarySize
= 0x400,
46 kPosStateBits
= 0x440,
49 kNumFastBytes
= 0x450,
58 CODER_INTERFACE(ICompressSetCoderProperties
, 0x20)
60 STDMETHOD(SetCoderProperties
)(const PROPID
*propIDs
,
61 const PROPVARIANT
*properties
, UInt32 numProperties
) PURE
;
65 CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
67 STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
71 CODER_INTERFACE(ICompressSetDecoderProperties2
, 0x22)
73 STDMETHOD(SetDecoderProperties2
)(const Byte
*data
, UInt32 size
) PURE
;
76 CODER_INTERFACE(ICompressWriteCoderProperties
, 0x23)
78 STDMETHOD(WriteCoderProperties
)(ISequentialOutStream
*outStreams
) PURE
;
81 CODER_INTERFACE(ICompressGetInStreamProcessedSize
, 0x24)
83 STDMETHOD(GetInStreamProcessedSize
)(UInt64
*value
) PURE
;
86 CODER_INTERFACE(ICompressGetSubStreamSize
, 0x30)
88 STDMETHOD(GetSubStreamSize
)(UInt64 subStream
, UInt64
*value
) PURE
;
91 CODER_INTERFACE(ICompressSetInStream
, 0x31)
93 STDMETHOD(SetInStream
)(ISequentialInStream
*inStream
) PURE
;
94 STDMETHOD(ReleaseInStream
)() PURE
;
97 CODER_INTERFACE(ICompressSetOutStream
, 0x32)
99 STDMETHOD(SetOutStream
)(ISequentialOutStream
*outStream
) PURE
;
100 STDMETHOD(ReleaseOutStream
)() PURE
;
103 CODER_INTERFACE(ICompressSetInStreamSize
, 0x33)
105 STDMETHOD(SetInStreamSize
)(const UInt64
*inSize
) PURE
;
108 CODER_INTERFACE(ICompressSetOutStreamSize
, 0x34)
110 STDMETHOD(SetOutStreamSize
)(const UInt64
*outSize
) PURE
;
113 CODER_INTERFACE(ICompressFilter
, 0x40)
115 STDMETHOD(Init
)() PURE
;
116 STDMETHOD_(UInt32
, Filter
)(Byte
*data
, UInt32 size
) PURE
;
117 // Filter return outSize (UInt32)
118 // if (outSize <= size): Filter have converted outSize bytes
119 // if (outSize > size): Filter have not converted anything.
120 // and it needs at least outSize bytes to convert one block
121 // (it's for crypto block algorithms).
124 CODER_INTERFACE(ICryptoProperties
, 0x80)
126 STDMETHOD(SetKey
)(const Byte
*data
, UInt32 size
) PURE
;
127 STDMETHOD(SetInitVector
)(const Byte
*data
, UInt32 size
) PURE
;
130 CODER_INTERFACE(ICryptoSetPassword
, 0x90)
132 STDMETHOD(CryptoSetPassword
)(const Byte
*data
, UInt32 size
) PURE
;
135 CODER_INTERFACE(ICryptoSetCRC
, 0xA0)
137 STDMETHOD(CryptoSetCRC
)(UInt32 crc
) PURE
;
140 //////////////////////
142 namespace NMethodPropID