File: UnBitArrayOld.h

package info (click to toggle)
libjmac-java 1.74-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,780 kB
  • sloc: java: 9,279; cpp: 4,375; xml: 369; makefile: 31; sh: 12
file content (46 lines) | stat: -rw-r--r-- 1,178 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef APE_UNBITARRAY_OLD_H
#define APE_UNBITARRAY_OLD_H

#include "All.h"
#ifdef BACKWARDS_COMPATIBILITY

#include "../UnBitArrayBase.h"

class IAPEDecompress;

// decodes 0000 up to and including 3890
class CUnBitArrayOld : public CUnBitArrayBase
{
public:

    // construction/destruction
    CUnBitArrayOld(IAPEDecompress *pAPEDecompress, int nVersion);
    ~CUnBitArrayOld();
    
    // functions
    void GenerateArray(int *pOutputArray, int nElements, int nBytesRequired = -1);
    unsigned int DecodeValue(DECODE_VALUE_METHOD DecodeMethod, int nParam1 = 0, int nParam2 = 0);
    
private:
    
    void GenerateArrayOld(int* pOutputArray, uint32 NumberOfElements, int MinimumBitArrayBytes);
    void GenerateArrayRice(int* pOutputArray, uint32 NumberOfElements, int MinimumBitArrayBytes);
    
    uint32 DecodeValueRiceUnsigned(uint32 k);
    
    // data 
    uint32 k;
    uint32 K_Sum;
    uint32 m_nRefillBitThreshold;
    
    // functions
    __inline int DecodeValueNew(BOOL bCapOverflow);
    uint32 GetBitsRemaining();
    __inline uint32 Get_K(uint32 x);
};

#endif

#endif    // #ifndef APE_UNBITARRAY_OLD_H