(buf, offset = 0)
| 402 | } |
| 403 | |
| 404 | function readInt24LE(buf, offset = 0) { |
| 405 | validateNumber(offset, 'offset'); |
| 406 | const first = buf[offset]; |
| 407 | const last = buf[offset + 2]; |
| 408 | if (first === undefined || last === undefined) |
| 409 | boundsError(offset, buf.length - 3); |
| 410 | |
| 411 | const val = first + buf[++offset] * 2 ** 8 + last * 2 ** 16; |
| 412 | return val | (val & 2 ** 23) * 0x1fe; |
| 413 | } |
| 414 | |
| 415 | function readInt16LE(buf, offset = 0) { |
| 416 | validateNumber(offset, 'offset'); |
no test coverage detected