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

Function readInt32BE

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

Source from the content-addressed store, hash-verified

481}
482
483function 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
496function readInt24BE(buf, offset = 0) {
497 validateNumber(offset, 'offset');

Callers 2

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…