MCPcopy Create free account
hub / github.com/LASzip/LASzip / ArithmeticDecoder

Class ArithmeticDecoder

src/arithmeticdecoder.hpp:46–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44class ArithmeticBitModel;
45
46class ArithmeticDecoder
47{
48public:
49
50/* Constructor & Destructor */
51 ArithmeticDecoder();
52 ~ArithmeticDecoder();
53
54/* Manage decoding */
55 BOOL init(ByteStreamIn* instream, BOOL really_init = TRUE);
56 void done();
57
58/* Manage an entropy model for a single bit */
59 ArithmeticBitModel* createBitModel();
60 void initBitModel(ArithmeticBitModel* model);
61 void destroyBitModel(ArithmeticBitModel* model);
62
63/* Manage an entropy model for n symbols (table optional) */
64 ArithmeticModel* createSymbolModel(U32 n);
65 void initSymbolModel(ArithmeticModel* model, U32* table=0);
66 void destroySymbolModel(ArithmeticModel* model);
67
68/* Decode a bit with modelling */
69 U32 decodeBit(ArithmeticBitModel* model);
70
71/* Decode a symbol with modelling */
72 U32 decodeSymbol(ArithmeticModel* model);
73
74/* Decode a bit without modelling */
75 U32 readBit();
76
77/* Decode bits without modelling */
78 U32 readBits(U32 bits);
79
80/* Decode an unsigned char without modelling */
81 U8 readByte();
82
83/* Decode an unsigned short without modelling */
84 U16 readShort();
85
86/* Decode an unsigned int without modelling */
87 U32 readInt();
88
89/* Decode a float without modelling */
90 F32 readFloat();
91
92/* Decode an unsigned 64 bit int without modelling */
93 U64 readInt64();
94
95/* Decode a double without modelling */
96 F64 readDouble();
97
98/* Only read from instream if ArithmeticDecoder is dummy */
99 ByteStreamIn* getByteStreamIn() const { return instream; };
100
101private:
102
103 ByteStreamIn* instream;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected