UNPKG

@gmod/bbi

Version:

Parser for BigWig/BigBed files

37 lines 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unzipBatch = unzipBatch; exports.decompressAndParseBigWigBlocks = decompressAndParseBigWigBlocks; exports.decompressAndParseSummaryBlocks = decompressAndParseSummaryBlocks; const inflate_wasm_inlined_js_1 = require("./wasm/inflate-wasm-inlined.js"); async function unzipBatch(data, blocks, maxOutputSize) { const inputOffsets = new Uint32Array(blocks.length); const inputLengths = new Uint32Array(blocks.length); for (let i = 0; i < blocks.length; i++) { const block = blocks[i]; inputOffsets[i] = block.offset; inputLengths[i] = block.length; } return (0, inflate_wasm_inlined_js_1.inflateRawBatch)(data, inputOffsets, inputLengths, maxOutputSize); } async function decompressAndParseBigWigBlocks(data, blocks, maxOutputSize, reqStart, reqEnd) { const inputOffsets = new Uint32Array(blocks.length); const inputLengths = new Uint32Array(blocks.length); for (let i = 0; i < blocks.length; i++) { const block = blocks[i]; inputOffsets[i] = block.offset; inputLengths[i] = block.length; } return (0, inflate_wasm_inlined_js_1.decompressAndParseBigWig)(data, inputOffsets, inputLengths, maxOutputSize, reqStart, reqEnd); } async function decompressAndParseSummaryBlocks(data, blocks, maxOutputSize, reqChrId, reqStart, reqEnd) { const inputOffsets = new Uint32Array(blocks.length); const inputLengths = new Uint32Array(blocks.length); for (let i = 0; i < blocks.length; i++) { const block = blocks[i]; inputOffsets[i] = block.offset; inputLengths[i] = block.length; } return (0, inflate_wasm_inlined_js_1.decompressAndParseSummary)(data, inputOffsets, inputLengths, maxOutputSize, reqChrId, reqStart, reqEnd); } //# sourceMappingURL=unzip.js.map