* See ISO 16022:2006, 5.4.1, Table 6 */
| 81 | * See ISO 16022:2006, 5.4.1, Table 6 |
| 82 | */ |
| 83 | static 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 |
no test coverage detected