import type { ArchiveDetectionReport, ArchiveInputKind, ArchiveOpenOptions } from './types.js'; import type { ArchiveDataInput, ArchiveReader } from './contracts.js'; import { ZipReader } from '../reader/ZipReader.js'; export type ArchivePreflightResourceInfo = { algorithm: 'bzip2' | 'xz'; requiredBlockSize?: number; requiredDictionaryBytes?: number; requiredIndexRecords?: number; requiredIndexBytes?: number; isComplete?: boolean; requiredBlockHeaderCount?: number; blockHeaderLimit?: number; }; export type ArchiveZipDetection = { inputKind: ArchiveInputKind; confidence: ArchiveDetectionReport['confidence']; notes: string[]; }; export type ArchiveOpenContext = { preflight?: ArchivePreflightResourceInfo; }; /** * Core archive opening implementation used by the public facade and runtime adapters. * * @example * ```ts * import { openArchive } from "../../mod.ts"; * * const reader = await openArchive(bytes, { safetyProfile: "untrusted" }); * const report = await reader.audit(); * if (!report.isSafe) throw new Error("Unsafe archive"); * ``` */ export declare function openArchive(input: ArchiveDataInput, options?: ArchiveOpenOptions): Promise; /** @internal Open an archive with transport-specific preflight information. */ export declare function openArchiveWithContext(input: ArchiveDataInput, options?: ArchiveOpenOptions, context?: ArchiveOpenContext): Promise; /** @internal Adapt an already-open ZIP subsystem reader to the archive facade. */ export declare function createZipArchiveReader(reader: ZipReader, detection: ArchiveZipDetection, options?: ArchiveOpenOptions): ArchiveReader; //# sourceMappingURL=open.d.ts.map