(buf, offset = 0)
| 494 | } |
| 495 | |
| 496 | function readInt24BE(buf, offset = 0) { |
| 497 | validateNumber(offset, 'offset'); |
| 498 | const first = buf[offset]; |
| 499 | const last = buf[offset + 2]; |
| 500 | if (first === undefined || last === undefined) |
| 501 | boundsError(offset, buf.length - 3); |
| 502 | |
| 503 | const val = first * 2 ** 16 + buf[++offset] * 2 ** 8 + last; |
| 504 | return val | (val & 2 ** 23) * 0x1fe; |
| 505 | } |
| 506 | |
| 507 | function readInt16BE(buf, offset = 0) { |
| 508 | validateNumber(offset, 'offset'); |
no test coverage detected