mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 18:11:35 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
89
CPP/7zip/Compress/PPMD/PPMDDecoder.h
Executable file
89
CPP/7zip/Compress/PPMD/PPMDDecoder.h
Executable file
@@ -0,0 +1,89 @@
|
||||
// Compress/PPM/PPMDDecoder.h
|
||||
|
||||
#ifndef __COMPRESS_PPMD_DECODER_H
|
||||
#define __COMPRESS_PPMD_DECODER_H
|
||||
|
||||
#include "../../../Common/MyCom.h"
|
||||
|
||||
#include "../../ICoder.h"
|
||||
#include "../../Common/OutBuffer.h"
|
||||
#include "../RangeCoder/RangeCoder.h"
|
||||
|
||||
#include "PPMDDecode.h"
|
||||
|
||||
namespace NCompress {
|
||||
namespace NPPMD {
|
||||
|
||||
class CDecoder :
|
||||
public ICompressCoder,
|
||||
public ICompressSetDecoderProperties2,
|
||||
#ifdef _ST_MODE
|
||||
public ICompressSetInStream,
|
||||
public ICompressSetOutStreamSize,
|
||||
public ISequentialInStream,
|
||||
#endif
|
||||
public CMyUnknownImp
|
||||
{
|
||||
CRangeDecoder _rangeDecoder;
|
||||
|
||||
COutBuffer _outStream;
|
||||
|
||||
CDecodeInfo _info;
|
||||
|
||||
Byte _order;
|
||||
UInt32 _usedMemorySize;
|
||||
|
||||
int _remainLen;
|
||||
UInt64 _outSize;
|
||||
bool _outSizeDefined;
|
||||
UInt64 _processedSize;
|
||||
|
||||
HRESULT CodeSpec(UInt32 num, Byte *memStream);
|
||||
public:
|
||||
|
||||
#ifdef _ST_MODE
|
||||
MY_UNKNOWN_IMP4(
|
||||
ICompressSetDecoderProperties2,
|
||||
ICompressSetInStream,
|
||||
ICompressSetOutStreamSize,
|
||||
ISequentialInStream)
|
||||
#else
|
||||
MY_UNKNOWN_IMP1(
|
||||
ICompressSetDecoderProperties2)
|
||||
#endif
|
||||
|
||||
void ReleaseStreams()
|
||||
{
|
||||
ReleaseInStream();
|
||||
_outStream.ReleaseStream();
|
||||
}
|
||||
|
||||
HRESULT Flush() { return _outStream.Flush(); }
|
||||
|
||||
STDMETHOD(CodeReal)(ISequentialInStream *inStream,
|
||||
ISequentialOutStream *outStream,
|
||||
const UInt64 *inSize, const UInt64 *outSize,
|
||||
ICompressProgressInfo *progress);
|
||||
|
||||
STDMETHOD(Code)(ISequentialInStream *inStream,
|
||||
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
|
||||
ICompressProgressInfo *progress);
|
||||
|
||||
|
||||
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
|
||||
|
||||
STDMETHOD(SetInStream)(ISequentialInStream *inStream);
|
||||
STDMETHOD(ReleaseInStream)();
|
||||
STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
|
||||
|
||||
#ifdef _ST_MODE
|
||||
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
|
||||
#endif
|
||||
|
||||
CDecoder(): _outSizeDefined(false) {}
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user