1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// ICoder.h 2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __ICODER_H 4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __ICODER_H 5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "IStream.h" 7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define CODER_INTERFACE(i, x) DECL_INTERFACE(i, 4, x) 9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 10baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressProgressInfo, 0x04) 11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE; 13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 15baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressCoder, 0x05) 16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, 18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const UInt64 *inSize, const UInt64 *outSize, 19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ICompressProgressInfo *progress) PURE; 20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 22baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressCoder2, 0x18) 23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, 25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, 26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ICompressProgressInfo *progress) PURE; 27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 28baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 29baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace NCoderPropID 30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync enum EEnum 32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync { 33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kDefaultProp = 0, 34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kDictionarySize, 35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kUsedMemorySize, 36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kOrder, 37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kBlockSize, 38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kPosStateBits, 39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kLitContextBits, 40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kLitPosBits, 41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kNumFastBytes, 42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kMatchFinder, 43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kMatchFinderCycles, 44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kNumPasses, 45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kAlgorithm, 46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kNumThreads, 47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kEndMarker 48baa3858d3f5d128a5c8466b700098109edcad5f2repo sync }; 49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} 50baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 51baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetCoderProperties, 0x20) 52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) PURE; 54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 56baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* 57baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetCoderProperties, 0x21) 58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE; 60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/ 62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 63baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetDecoderProperties2, 0x22) 64baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 65baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE; 66baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 67baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 68baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressWriteCoderProperties, 0x23) 69baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 70baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream) PURE; 71baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 72baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 73baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24) 74baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 75baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE; 76baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 77baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 78baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetCoderMt, 0x25) 79baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 80baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE; 81baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 82baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 83baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressGetSubStreamSize, 0x30) 84baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 85baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE; 86baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 87baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 88baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetInStream, 0x31) 89baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 90baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE; 91baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(ReleaseInStream)() PURE; 92baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 93baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 94baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetOutStream, 0x32) 95baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 96baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE; 97baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(ReleaseOutStream)() PURE; 98baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 99baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 100baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetInStreamSize, 0x33) 101baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 102baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE; 103baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 104baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 105baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetOutStreamSize, 0x34) 106baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 107baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE; 108baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 109baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 110baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressSetBufSize, 0x35) 111baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 112baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size) PURE; 113baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size) PURE; 114baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 115baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 116baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressFilter, 0x40) 117baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 118baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(Init)() PURE; 119baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE; 120baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // Filter converts as most as possible bytes 121baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // Filter return outSize (UInt32) 122baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // if (outSize <= size): Filter have converted outSize bytes 123baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // if (outSize > size): Filter have not converted anything. 124baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // and it needs at least outSize bytes to convert one block 125baa3858d3f5d128a5c8466b700098109edcad5f2repo sync // (it's for crypto block algorithms). 126baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 127baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 128baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICompressCodecsInfo, 0x60) 129baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 130baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods) PURE; 131baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE; 132baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder) PURE; 133baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder) PURE; 134baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 135baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ISetCompressCodecsInfo, 0x61) 136baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 137baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo) PURE; 138baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 139baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 140baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICryptoProperties, 0x80) 141baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 142baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE; 143baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE; 144baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 145baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 146baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* 147baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICryptoResetSalt, 0x88) 148baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 149baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(ResetSalt)() PURE; 150baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 151baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/ 152baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 153baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICryptoResetInitVector, 0x8C) 154baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 155baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(ResetInitVector)() PURE; 156baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 157baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 158baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICryptoSetPassword, 0x90) 159baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 160baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE; 161baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 162baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 163baa3858d3f5d128a5c8466b700098109edcad5f2repo syncCODER_INTERFACE(ICryptoSetCRC, 0xA0) 164baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 165baa3858d3f5d128a5c8466b700098109edcad5f2repo sync STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE; 166baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 167baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 168baa3858d3f5d128a5c8466b700098109edcad5f2repo sync////////////////////// 169baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// It's for DLL file 170baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace NMethodPropID 171baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 172baa3858d3f5d128a5c8466b700098109edcad5f2repo sync enum EEnum 173baa3858d3f5d128a5c8466b700098109edcad5f2repo sync { 174baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kID, 175baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kName, 176baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kDecoder, 177baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kEncoder, 178baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kInStreams, 179baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kOutStreams, 180baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kDescription, 181baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kDecoderIsAssigned, 182baa3858d3f5d128a5c8466b700098109edcad5f2repo sync kEncoderIsAssigned 183baa3858d3f5d128a5c8466b700098109edcad5f2repo sync }; 184baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} 185baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 186baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif 187