UNPKG

@gmod/bam

Version:

Parser for BAM and BAM index (bai) files

19 lines 731 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TWO_PWR_32_DBL = exports.TWO_PWR_16_DBL = void 0; exports.longFromBytesToUnsigned = longFromBytesToUnsigned; exports.TWO_PWR_16_DBL = 1 << 16; exports.TWO_PWR_32_DBL = exports.TWO_PWR_16_DBL * exports.TWO_PWR_16_DBL; // avoids dependency on long.js function longFromBytesToUnsigned(source, i = 0) { const low = source[i] | (source[i + 1] << 8) | (source[i + 2] << 16) | (source[i + 3] << 24); const high = source[i + 4] | (source[i + 5] << 8) | (source[i + 6] << 16) | (source[i + 7] << 24); return (high >>> 0) * exports.TWO_PWR_32_DBL + (low >>> 0); } //# sourceMappingURL=long.js.map