MCPcopy Index your code
hub / github.com/nodejs/node / readInt40BE

Function readInt40BE

lib/internal/buffer.js:469–481  ·  view source on GitHub ↗
(buf, offset = 0)

Source from the content-addressed store, hash-verified

467}
468
469function readInt40BE(buf, offset = 0) {
470 validateNumber(offset, 'offset');
471 const first = buf[offset];
472 const last = buf[offset + 4];
473 if (first === undefined || last === undefined)
474 boundsError(offset, buf.length - 5);
475
476 return (first | (first & 2 ** 7) * 0x1fffffe) * 2 ** 32 +
477 buf[++offset] * 2 ** 24 +
478 buf[++offset] * 2 ** 16 +
479 buf[++offset] * 2 ** 8 +
480 last;
481}
482
483function readInt32BE(buf, offset = 0) {
484 validateNumber(offset, 'offset');

Callers 1

readIntBEFunction · 0.85

Calls 1

boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…