(buf, offset = 0)
| 280 | } |
| 281 | |
| 282 | function readUInt48BE(buf, offset = 0) { |
| 283 | validateNumber(offset, 'offset'); |
| 284 | const first = buf[offset]; |
| 285 | const last = buf[offset + 5]; |
| 286 | if (first === undefined || last === undefined) |
| 287 | boundsError(offset, buf.length - 6); |
| 288 | |
| 289 | return (first * 2 ** 8 + buf[++offset]) * 2 ** 32 + |
| 290 | buf[++offset] * 2 ** 24 + |
| 291 | buf[++offset] * 2 ** 16 + |
| 292 | buf[++offset] * 2 ** 8 + |
| 293 | last; |
| 294 | } |
| 295 | |
| 296 | function readUInt40BE(buf, offset = 0) { |
| 297 | validateNumber(offset, 'offset'); |
no test coverage detected