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,
60 CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
62 STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
63 const PROPVARIANT *properties, UInt32 numProperties) PURE;
67 CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
69 STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
73 CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
75 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
78 CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
80 STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
83 CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
85 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
88 CODER_INTERFACE(ICompressSetCoderMt, 0x25)
90 STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
93 CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
95 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
98 CODER_INTERFACE(ICompressSetInStream, 0x31)
100 STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
101 STDMETHOD(ReleaseInStream)() PURE;
104 CODER_INTERFACE(ICompressSetOutStream, 0x32)
106 STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
107 STDMETHOD(ReleaseOutStream)() PURE;
110 CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
112 STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
115 CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
117 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
120 CODER_INTERFACE(ICompressFilter, 0x40)
122 STDMETHOD(Init)() PURE;
123 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
124 // Filter return outSize (UInt32)
125 // if (outSize <= size): Filter have converted outSize bytes
126 // if (outSize > size): Filter have not converted anything.
127 // and it needs at least outSize bytes to convert one block
128 // (it's for crypto block algorithms).
131 CODER_INTERFACE(ICryptoProperties, 0x80)
133 STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
134 STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
137 CODER_INTERFACE(ICryptoSetPassword, 0x90)
139 STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
142 CODER_INTERFACE(ICryptoSetCRC, 0xA0)
144 STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
147 //////////////////////
149 namespace NMethodPropID