@gmod/bgzf-filehandle
Version:
read from a compressed bgzip file (with .gzi) as if it were uncompressed
21 lines • 539 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sum = sum;
exports.concatUint8Array = concatUint8Array;
function sum(array) {
let sum = 0;
for (const entry of array) {
sum += entry.length;
}
return sum;
}
function concatUint8Array(args) {
const mergedArray = new Uint8Array(sum(args));
let offset = 0;
for (const entry of args) {
mergedArray.set(entry, offset);
offset += entry.length;
}
return mergedArray;
}
//# sourceMappingURL=util.js.map