UNPKG

@gmod/bgzf-filehandle

Version:

read from a compressed bgzip file (with .gzi) as if it were uncompressed

17 lines (16 loc) 652 B
import GziIndex from './gziIndex.ts'; import type { GenericFilehandle } from 'generic-filehandle2'; declare function createLimit(concurrency: number): <T>(task: () => Promise<T> | T) => Promise<T>; export default class BgzFilehandle { filehandle: GenericFilehandle; gzi: GziIndex; limit: ReturnType<typeof createLimit>; constructor({ filehandle, gziFilehandle, blockConcurrency, }: { filehandle: GenericFilehandle; gziFilehandle: GenericFilehandle; blockConcurrency?: number; }); private _readAndUncompressBlock; read(length: number, position: number): Promise<Uint8Array<ArrayBuffer>>; } export {};