diff options
Diffstat (limited to 'CPP/7zip/Compress/PpmdZip.h')
-rwxr-xr-x | CPP/7zip/Compress/PpmdZip.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/CPP/7zip/Compress/PpmdZip.h b/CPP/7zip/Compress/PpmdZip.h index c2288b5a..e15a060d 100755 --- a/CPP/7zip/Compress/PpmdZip.h +++ b/CPP/7zip/Compress/PpmdZip.h @@ -1,5 +1,4 @@ // PpmdZip.h -// 2010-03-11 : Igor Pavlov : Public domain #ifndef __COMPRESS_PPMD_ZIP_H #define __COMPRESS_PPMD_ZIP_H @@ -48,21 +47,37 @@ public: ~CDecoder(); }; +struct CEncProps +{ + UInt32 MemSizeMB; + UInt32 ReduceSize; + int Order; + int Restor; + + CEncProps() + { + MemSizeMB = (UInt32)(Int32)-1; + ReduceSize = (UInt32)(Int32)-1; + Order = -1; + Restor = -1; + } + void Normalize(int level); +}; + class CEncoder : public ICompressCoder, + public ICompressSetCoderProperties, public CMyUnknownImp { CByteOutBufWrap _outStream; CBuf _inStream; CPpmd8 _ppmd; - UInt32 _usedMemInMB; - unsigned _order; - unsigned _restor; + CEncProps _props; public: - MY_UNKNOWN_IMP + MY_UNKNOWN_IMP1(ICompressSetCoderProperties) STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); - HRESULT SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); CEncoder(); ~CEncoder(); }; |