~ubuntu-branches/ubuntu/trusty/advancecomp/trusty

« back to all changes in this revision

Viewing changes to 7z/LZMADecoder.h

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ozarowski
  • Date: 2006-05-13 21:15:49 UTC
  • Revision ID: james.westby@ubuntu.com-20060513211549-2vu7peis643ojcm5
Tags: upstream-1.15
ImportĀ upstreamĀ versionĀ 1.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __LZARITHMETIC_DECODER_H
 
2
#define __LZARITHMETIC_DECODER_H
 
3
 
 
4
#include "WindowOut.h"
 
5
#include "LZMA.h"
 
6
#include "LenCoder.h"
 
7
#include "LiteralCoder.h"
 
8
 
 
9
namespace NCompress {
 
10
namespace NLZMA {
 
11
 
 
12
typedef CMyBitDecoder<kNumMoveBitsForMainChoice> CMyBitDecoder2;
 
13
 
 
14
class CDecoder
 
15
{
 
16
  NStream::NWindow::COut m_OutWindowStream;
 
17
  CMyRangeDecoder m_RangeDecoder;
 
18
 
 
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];
 
25
 
 
26
  CBitTreeDecoder<kNumMoveBitsForPosSlotCoder, kNumPosSlotBits> m_PosSlotDecoder[kNumLenToPosStates];
 
27
 
 
28
  CReverseBitTreeDecoder2<kNumMoveBitsForPosCoders> m_PosDecoders[kNumPosModels];
 
29
  CReverseBitTreeDecoder<kNumMoveBitsForAlignCoders, kNumAlignBits> m_PosAlignDecoder;
 
30
  
 
31
  NLength::CDecoder m_LenDecoder;
 
32
  NLength::CDecoder m_RepMatchLenDecoder;
 
33
 
 
34
  NLiteral::CDecoder m_LiteralDecoder;
 
35
 
 
36
  INT m_DictionarySize;
 
37
  
 
38
  INT m_PosStateMask;
 
39
 
 
40
  HRESULT Create();
 
41
 
 
42
  HRESULT Init(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream);
 
43
 
 
44
  HRESULT Flush() {  return m_OutWindowStream.Flush(); }
 
45
 
 
46
  HRESULT CodeReal(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream, const UINT64 *anInSize, const UINT64 *anOutSize);
 
47
 
 
48
public:
 
49
 
 
50
  CDecoder();
 
51
  
 
52
  HRESULT Code(ISequentialInStream *anInStream, ISequentialOutStream *anOutStream, const UINT64 *anInSize, const UINT64 *anOutSize);
 
53
  HRESULT ReadCoderProperties(ISequentialInStream *anInStream);
 
54
 
 
55
  HRESULT SetDictionarySize(INT aDictionarySize);
 
56
  HRESULT SetLiteralProperties(INT aLiteralPosStateBits, INT aLiteralContextBits);
 
57
  HRESULT SetPosBitsProperties(INT aNumPosStateBits);
 
58
};
 
59
 
 
60
}}
 
61
 
 
62
#endif