MCPcopy Create free account
hub / github.com/devilsen/CZXing / ParseECIValue

Function ParseECIValue

czxing/src/main/cpp/zxing/src/datamatrix/DMDecoder.cpp:83–96  ·  view source on GitHub ↗

* See ISO 16022:2006, 5.4.1, Table 6 */

Source from the content-addressed store, hash-verified

81* See ISO 16022:2006, 5.4.1, Table 6
82*/
83static ECI ParseECIValue(BitSource& bits)
84{
85 int firstByte = bits.readBits(8);
86 if (firstByte <= 127)
87 return ECI(firstByte - 1);
88
89 int secondByte = bits.readBits(8);
90 if (firstByte <= 191)
91 return ECI((firstByte - 128) * 254 + 127 + secondByte - 1);
92
93 int thirdByte = bits.readBits(8);
94
95 return ECI((firstByte - 192) * 64516 + 16383 + (secondByte - 1) * 254 + thirdByte - 1);
96}
97
98/**
99* See ISO 16022:2006, 5.6

Callers 1

DecoderResult DecodeFunction · 0.70

Calls 2

ECIEnum · 0.50
readBitsMethod · 0.45

Tested by

no test coverage detected