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

Function readBigInt64BE

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

Source from the content-addressed store, hash-verified

154}
155
156function readBigInt64BE(offset = 0) {
157 validateNumber(offset, 'offset');
158 const first = this[offset];
159 const last = this[offset + 7];
160 if (first === undefined || last === undefined)
161 boundsError(offset, this.length - 8);
162
163 const val = (first << 24) + // Overflow
164 this[++offset] * 2 ** 16 +
165 this[++offset] * 2 ** 8 +
166 this[++offset];
167 return (BigInt(val) << 32n) +
168 BigInt(this[++offset] * 2 ** 24 +
169 this[++offset] * 2 ** 16 +
170 this[++offset] * 2 ** 8 +
171 last);
172}
173
174function readUIntLE(offset, byteLength) {
175 if (offset === undefined)

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…