(buf, offset = 0)
| 481 | } |
| 482 | |
| 483 | function readInt32BE(buf, offset = 0) { |
| 484 | validateNumber(offset, 'offset'); |
| 485 | const first = buf[offset]; |
| 486 | const last = buf[offset + 3]; |
| 487 | if (first === undefined || last === undefined) |
| 488 | boundsError(offset, buf.length - 4); |
| 489 | |
| 490 | return (first << 24) + // Overflow |
| 491 | buf[++offset] * 2 ** 16 + |
| 492 | buf[++offset] * 2 ** 8 + |
| 493 | last; |
| 494 | } |
| 495 | |
| 496 | function readInt24BE(buf, offset = 0) { |
| 497 | validateNumber(offset, 'offset'); |
no test coverage detected
searching dependent graphs…