* See ISO/IEC 16023:2000 Section 4.6 Table 3 */
| 175 | * See ISO/IEC 16023:2000 Section 4.6 Table 3 |
| 176 | */ |
| 177 | static ZXing::ECI ParseECIValue(const ByteArray& bytes, int& i) |
| 178 | { |
| 179 | int firstByte = bytes[++i]; |
| 180 | if ((firstByte & 0x20) == 0) |
| 181 | return ZXing::ECI(firstByte); |
| 182 | |
| 183 | int secondByte = bytes[++i]; |
| 184 | if ((firstByte & 0x10) == 0) |
| 185 | return ZXing::ECI(((firstByte & 0x0F) << 6) | secondByte); |
| 186 | |
| 187 | int thirdByte = bytes[++i]; |
| 188 | if ((firstByte & 0x08) == 0) |
| 189 | return ZXing::ECI(((firstByte & 0x07) << 12) | (secondByte << 6) | thirdByte); |
| 190 | |
| 191 | int fourthByte = bytes[++i]; |
| 192 | return ZXing::ECI(((firstByte & 0x03) << 18) | (secondByte << 12) | (thirdByte << 6) | fourthByte); |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * See ISO/IEC 16023:2000 Section 4.9.1 Table 5 |