/**
 * ZIP file format builder
 *
 * Implements ZIP file structure according to PKWARE's APPNOTE.TXT specification
 * https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
 *
 * ZIP file structure:
 * ┌──────────────────────────┐
 * │   Local File Header 1    │
 * │   File Data 1            │
 * ├──────────────────────────┤
 * │   Local File Header 2    │
 * │   File Data 2            │
 * ├──────────────────────────┤
 * │         ...              │
 * ├──────────────────────────┤
 * │  Central Directory 1     │
 * │  Central Directory 2     │
 * │         ...              │
 * ├──────────────────────────┤
 * │ End of Central Directory │
 * └──────────────────────────┘
 */
import { type CompressOptions } from "./compress.js";
import { type ZipTimestampMode } from "./utils/timestamps.js";
/**
 * ZIP file entry
 */
export interface ZipEntry {
    /** File name (can include directory path, use forward slashes) */
    name: string;
    /** File data (will be compressed unless level=0) */
    data: Uint8Array;
    /** File modification time (optional, defaults to current time) */
    modTime?: Date;
    /** File comment (optional) */
    comment?: string;
}
/**
 * ZIP builder options
 */
export interface ZipOptions extends CompressOptions {
    /** ZIP file comment (optional) */
    comment?: string;
    /**
     * Timestamp writing strategy.
     * - "dos": only write DOS date/time fields (smallest output)
     * - "dos+utc": also write UTC mtime in 0x5455 extra field (default, best practice)
     */
    timestamps?: ZipTimestampMode;
}
/**
 * Create a ZIP file from entries (async)
 *
 * @param entries - Files to include in ZIP
 * @param options - ZIP options
 * @returns ZIP file as Uint8Array
 *
 * @example
 * ```ts
 * const zip = await createZip([
 *   { name: "hello.txt", data: new TextEncoder().encode("Hello!") },
 *   { name: "folder/file.txt", data: new TextEncoder().encode("Nested!") }
 * ], { level: 6 });
 * ```
 */
export declare function createZip(entries: ZipEntry[], options?: ZipOptions): Promise<Uint8Array>;
/**
 * Create a ZIP file from entries (sync)
 *
 * This is supported in both Node.js and browser builds.
 */
export declare function createZipSync(entries: ZipEntry[], options?: ZipOptions): Uint8Array;
/**
 * Streaming ZIP builder for large files
 * Writes chunks to a callback as they are generated
 */
export declare class ZipBuilder {
    private entries;
    private currentOffset;
    private level;
    private zipComment;
    private timestamps;
    private compressOptions;
    private settings;
    private finalized;
    /**
     * Create a new ZIP builder
     * @param options - ZIP options
     */
    constructor(options?: ZipOptions);
    /**
     * Add a file to the ZIP (async)
     * @param entry - File entry
     * @returns Local file header and compressed data chunks
     */
    addFile(entry: ZipEntry): Promise<Uint8Array[]>;
    /**
     * Add a file to the ZIP (sync)
     * @param entry - File entry
     * @returns Local file header and compressed data chunks
     */
    addFileSync(entry: ZipEntry): Uint8Array[];
    /**
     * Finalize the ZIP and return central directory + end record
     * @returns Central directory and end of central directory chunks
     */
    finalize(): Uint8Array[];
    /**
     * Get current number of entries
     */
    get entryCount(): number;
    /**
     * Get current ZIP data size (without central directory)
     */
    get dataSize(): number;
}
