import type { BundleFileReader } from './types.js'; export declare const POSTEXT_EXTENSION = ".postext"; export declare const POSTEXT_MIME = "application/zip"; export declare const MANIFEST_FILE = "preset.json"; export interface OpenedBundleZip { /** The parsed `preset.json` (not yet validated). */ manifest: unknown; readFile: BundleFileReader; /** Directory prefix under which the bundle lives inside the archive * (empty when `preset.json` sits at the root). */ rootPrefix: string; /** Normalised paths of every file entry, prefix included. */ entries: string[]; /** Every file, keyed by its path relative to the bundle root. */ files: Map; } /** Unzip a `.postext` archive and locate its manifest. Throws when the * bytes are not a zip or hold no (or several) `preset.json`. */ export declare function openBundleZip(bytes: Uint8Array): OpenedBundleZip; export interface ZipBundleOptions { /** Modification date written on every file of the archive. Unset: the * time of the call, so two archives of the same files differ in those * bytes. Pass a fixed date and the same files always give the same * bytes. A zip keeps a date and time with no time zone, in two-second * steps, from 1980 to 2099, and the date is written in the machine's * local time. For bytes that match on every machine, build the date * from local fields (`new Date(1980, 0, 1)`, the earliest a zip can * hold): a timestamp or a string ending in `Z` names an instant, which * falls on a different local time in each time zone. A date outside * those years, in local time, throws. */ mtime?: Date | number | string; } /** Zip a bundle's files (path → bytes). Already-compressed payloads are * stored as-is. */ export declare function zipBundle(files: Record, options?: ZipBundleOptions): Uint8Array; //# sourceMappingURL=zip.d.ts.map