/** @packageDocumentation * @module iModelHub */ import { CancelRequest } from "@bentley/itwin-client"; /** Configure download task * @internal */ export interface ConfigData { blockSize?: number; ignoreResumeData?: boolean; checkMD5AfterDownload?: boolean; simultaneousDownloads?: number; downloadRateWindowSize?: number; progressReportAfter?: number; enableResumableDownload?: boolean; } /** Progress data returned by progress callback * @internal */ export interface ProgressData { bytesTotal: number; bytesDone: number; percentage: number; blocksDownloading: number; blocksDownloaded: number; blocksPending: number; downloadRateBytesPerSec: number; windowRateBytesPerSec: number; } /** Allow to download blob as blocks in parallel. It also support * resume, md5 checksum and cross process download of same file. * @internal */ export declare class BlobDownloader { private static downloads; private static resumeDataVer; private static keepAliveAgent?; private static mutex; private static pipeline; private static allocateFile; private static calculateFileMD5; private static readHeader; private static makeDirectoryRecursive; private static checkAndFixUseConfig; private static getResumeData; private static createSession; private static saveResumeData; private static nextBlockId; private static hasPendingBlocks; private static markCompleted; private static markFailed; private static getBlockSize; private static getByteRange; private static downloadBlock; private static getHttpsAgent; private static downloadBlocks; private static checkDownloadedFileMD5; private static getProgress; private static startProgress; private static stopProgress; private static checkDownloadCancelled; private static checkAnotherProcessIsDownloadingSameFile; static formatBytes(bytes: number): string; static formatRate(bytePerSec: number): string; static downloadFile(downloadUrl: string, downloadFile: string, config?: ConfigData, onProgress?: (data: ProgressData) => void, cancelRequest?: CancelRequest): Promise; } //# sourceMappingURL=BlobDownloader.d.ts.map