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

Function readBigUInt64BE

lib/internal/buffer.js:118–136  ·  view source on GitHub ↗
(offset = 0)

Source from the content-addressed store, hash-verified

116}
117
118function readBigUInt64BE(offset = 0) {
119 validateNumber(offset, 'offset');
120 const first = this[offset];
121 const last = this[offset + 7];
122 if (first === undefined || last === undefined)
123 boundsError(offset, this.length - 8);
124
125 const hi = first * 2 ** 24 +
126 this[++offset] * 2 ** 16 +
127 this[++offset] * 2 ** 8 +
128 this[++offset];
129
130 const lo = this[++offset] * 2 ** 24 +
131 this[++offset] * 2 ** 16 +
132 this[++offset] * 2 ** 8 +
133 last;
134
135 return (BigInt(hi) << 32n) + BigInt(lo);
136}
137
138function readBigInt64LE(offset = 0) {
139 validateNumber(offset, 'offset');

Callers

nothing calls this directly

Calls 1

boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…