1
#ifndef __LZARITHMETIC_DECODER_H
2
#define __LZARITHMETIC_DECODER_H
7
#include "LiteralCoder.h"
12
typedef CMyBitDecoder<kNumMoveBitsForMainChoice> CMyBitDecoder2;
16
NStream::NWindow::COut m_OutWindowStream;
17
CMyRangeDecoder m_RangeDecoder;
19
CMyBitDecoder2 m_MainChoiceDecoders[kNumStates][NLength::kNumPosStatesMax];
20
CMyBitDecoder2 m_MatchChoiceDecoders[kNumStates];
21
CMyBitDecoder2 m_MatchRepChoiceDecoders[kNumStates];
22
CMyBitDecoder2 m_MatchRep1ChoiceDecoders[kNumStates];
23
CMyBitDecoder2 m_MatchRep2ChoiceDecoders[kNumStates];
24
CMyBitDecoder2 m_MatchRepShortChoiceDecoders[kNumStates][NLength::kNumPosStatesMax];
26
CBitTreeDecoder<kNumMoveBitsForPosSlotCoder, kNumPosSlotBits> m_PosSlotDecoder[kNumLenToPosStates];
28
CReverseBitTreeDecoder2<kNumMoveBitsForPosCoders> m_PosDecoders[kNumPosModels];
29
CReverseBitTreeDecoder<kNumMoveBitsForAlignCoders, kNumAlignBits> m_PosAlignDecoder;
31
NLength::CDecoder m_LenDecoder;
32
NLength::CDecoder m_RepMatchLenDecoder;
34
NLiteral::CDecoder m_LiteralDecoder;
42
HRESULT Init(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream);
44
HRESULT Flush() { return m_OutWindowStream.Flush(); }
46
HRESULT CodeReal(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream, const UINT64 *anInSize, const UINT64 *anOutSize);
52
HRESULT Code(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream, const UINT64 *anInSize, const UINT64 *anOutSize);
53
HRESULT ReadCoderProperties(ISequentialInStream *anInStream);
55
HRESULT SetDictionarySize(INT aDictionarySize);
56
HRESULT SetLiteralProperties(INT aLiteralPosStateBits, INT aLiteralContextBits);
57
HRESULT SetPosBitsProperties(INT aNumPosStateBits);