import { Loader } from '../core/loader'; import { BlobLike } from '../core/binary'; /** Input types accepted by the zip loader */ export type ZipInput = File | Blob | ArrayBuffer | BlobLike; interface LocalHeaderEntry { offset: number; uncompressedSize: number; } /** * Detect prepended data (self-extracting archive stub) by searching * for the first Local File Header signature from the start of the file. * * Returns the offset delta (0 if data starts at offset 0). * * @internal */ export declare function findPrependedDataSize(blob: BlobLike): Promise; /** * Patch a zip ArrayBuffer to correct for prepended data. * Adjusts all Central Directory entry offsets and the EOCD CD offset * by subtracting the given delta. * * @internal */ export declare function correctPrependedData(buffer: ArrayBuffer, delta: number): ArrayBuffer; /** * Read the zip archive comment from the EOCD record. * * @internal */ export declare function readZipComment(blob: BlobLike): Promise; /** * Scan the entire file for local file headers (PK\x03\x04) and build * a filename -> byte-offset map. This is the ground truth for where * each entry's data actually lives in the file. * * @internal */ export declare function buildLocalHeaderMap(blob: BlobLike): Promise>; /** * Extract entry data directly from the blob, bypassing zip.js. * Reads the local file header and decompresses the data. * * Handles data descriptors (bit 3 of general purpose flag): when the * local header has compressedSize = 0, uses the next local file header * position to determine data boundaries, then locates the data descriptor * to find the exact compressed data size. * * @internal */ export declare function extractDirectly(blob: BlobLike, localOffset: number, localHeaderMap?: Map): Promise; /** * Create a Loader from a File/Blob/ArrayBuffer that is a zip archive. * * Uses the Central Directory for normal zip files, with local-header fallback * strategies for malformed zip files: * * 1. Central Directory fast path * 2. Per-entry local header recovery for corrupted CD offsets * 3. Full local-header-only loader for unreadable Central Directories */ export declare function createZipLoader(input: ZipInput): Promise; /** * Check if a File/Blob is a zip archive by reading its magic bytes. */ export declare function isZipFile(input: ZipInput): Promise; export {}; //# sourceMappingURL=zip-loader.d.ts.map