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

Function DecodeNumericSegment

czxing/src/main/cpp/zxing/src/qrcode/QRDecoder.cpp:167–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167static void DecodeNumericSegment(BitSource& bits, int count, Content& result)
168{
169 result.switchEncoding(CharacterSet::ISO8859_1);
170 result.reserve(count);
171
172 while (count) {
173 int n = std::min(count, 3);
174 int nDigits = bits.readBits(1 + 3 * n); // read 4, 7 or 10 bits into 1, 2 or 3 digits
175 result.append(ZXing::ToString(nDigits, n));
176 count -= n;
177 }
178}
179
180static ECI ParseECIValue(BitSource& bits)
181{

Callers 1

Calls 6

ToStringFunction · 0.70
minFunction · 0.50
switchEncodingMethod · 0.45
reserveMethod · 0.45
readBitsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected