@gmod/bgzf-filehandle
Version:
read from a compressed bgzip file (with .gzi) as if it were uncompressed
12 lines • 551 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.readUint64LE = readUint64LE;
// Reads a little-endian unsigned 64-bit integer as a JS number. Exact for
// values up to Number.MAX_SAFE_INTEGER (2^53-1, ~9PB), matching the precision
// of the previous BigInt->Number path without allocating a BigInt per call.
function readUint64LE(view, offset = 0) {
const lo = view.getUint32(offset, true);
const hi = view.getUint32(offset + 4, true);
return hi * 0x1_0000_0000 + lo;
}
//# sourceMappingURL=long.js.map