Length Indicator: GSM08.16 sec 10.1.2 The length indicator may be 1 or 2 bytes, depending on bit 8, which is 0 to indicate a 15 bit length, or 1 to indicate a 7 bit length.
| 240 | // The length indicator may be 1 or 2 bytes, depending on bit 8, |
| 241 | // which is 0 to indicate a 15 bit length, or 1 to indicate a 7 bit length. |
| 242 | unsigned ByteVector::readLI(size_t &wp) |
| 243 | { |
| 244 | unsigned byte1 = getByte(wp++); |
| 245 | if (byte1 & 0x80) { return byte1 & 0x7f; } |
| 246 | return (byte1 * 256) + getByte(wp++); |
| 247 | } |
| 248 | |
| 249 | // This is a two byte length indicator as per GSM 08.16 10.1.2 |
| 250 | void ByteVector::appendLI(unsigned len) |