1 #ifndef APE_UNBITARRAYBASE_H
2 #define APE_UNBITARRAYBASE_H
9 struct UNBIT_ARRAY_STATE
15 enum DECODE_VALUE_METHOD
17 DECODE_VALUE_METHOD_UNSIGNED_INT
,
18 DECODE_VALUE_METHOD_UNSIGNED_RICE
,
19 DECODE_VALUE_METHOD_X_BITS
26 virtual ~CUnBitArrayBase() {}
28 virtual int FillBitArray();
29 virtual int FillAndResetBitArray(int nFileLocation
= -1,
30 int nNewBitIndex
= 0);
32 virtual void GenerateArray(int * pOutputArray
, int nElements
,
33 int nBytesRequired
= -1) {}
34 virtual uint
DecodeValue(DECODE_VALUE_METHOD DecodeMethod
,
35 int nParam1
= 0, int nParam2
= 0) { return 0; }
37 virtual void AdvanceToByteBoundary();
39 virtual int DecodeValueRange(UNBIT_ARRAY_STATE
& BitArrayState
)
41 virtual void FlushState(UNBIT_ARRAY_STATE
& BitArrayState
) {}
42 virtual void FlushBitArray() {}
43 virtual void Finalize() {}
46 virtual int CreateHelper(CIO
* pIO
, int nBytes
, int nVersion
);
47 virtual uint32
DecodeValueXBits(uint32 nBits
);
56 uint32 m_nCurrentBitIndex
;
60 CUnBitArrayBase
* CreateUnBitArray(IAPEDecompress
* pAPEDecompress
, int nVersion
);
63 #endif // #ifndef APE_UNBITARRAYBASE_H