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

Function readUInt48LE

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

Source from the content-addressed store, hash-verified

191}
192
193function readUInt48LE(buf, offset = 0) {
194 validateNumber(offset, 'offset');
195 const first = buf[offset];
196 const last = buf[offset + 5];
197 if (first === undefined || last === undefined)
198 boundsError(offset, buf.length - 6);
199
200 return first +
201 buf[++offset] * 2 ** 8 +
202 buf[++offset] * 2 ** 16 +
203 buf[++offset] * 2 ** 24 +
204 (buf[++offset] + last * 2 ** 8) * 2 ** 32;
205}
206
207function readUInt40LE(buf, offset = 0) {
208 validateNumber(offset, 'offset');

Callers 1

readUIntLEFunction · 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…