()
| 360 | } |
| 361 | |
| 362 | private readVarUint32Small14(): number { |
| 363 | const readIdx = this.cursor; |
| 364 | if (this.byteLength - readIdx >= 5) { |
| 365 | const fourByteValue = this.dataView.getUint32(readIdx, true); |
| 366 | this.cursor = readIdx + 1; |
| 367 | let value = fourByteValue & 0x7f; |
| 368 | if ((fourByteValue & 0x80) !== 0) { |
| 369 | this.cursor++; |
| 370 | value |= (fourByteValue >>> 1) & 0x3f80; |
| 371 | if ((fourByteValue & 0x8000) !== 0) { |
| 372 | return this.continueReadVarUint32(readIdx + 2, fourByteValue, value); |
| 373 | } |
| 374 | } |
| 375 | return value; |
| 376 | } else { |
| 377 | return this.readVarUint36Slow(); |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | private continueReadVarUint32( |
| 382 | readIdx: number, |
no test coverage detected