/** * Bundle format detection utilities. * * @example * ```typescript * import { BundleFormat, AITReader } from "@apps-in-toss/ait-format"; * * const buffer = await fs.readFile("bundle.ait"); * const format = BundleFormat.detect(buffer); * * if (format === BundleFormat.Format.AIT) { * const reader = AITReader.fromBuffer(buffer); * // Process AIT bundle * } else if (format === BundleFormat.Format.ZIP) { * // Process legacy ZIP bundle * } * ``` */ /** * Bundle format types. */ export declare enum Format { /** AIT bundle format (AITBUNDL magic) */ AIT = "AIT", /** Legacy ZIP format (PK magic) */ ZIP = "ZIP", /** Unknown format */ UNKNOWN = "UNKNOWN" } /** * Bundle format detection utilities. */ export declare const BundleFormat: { /** * Format enum for convenience. */ readonly Format: typeof Format; /** * Detect the bundle format from a buffer. * * @param buffer - The buffer to detect format from (only first 8 bytes are needed) * @returns The detected format */ readonly detect: (buffer: Uint8Array) => Format; /** * Check if the buffer represents an AIT format. * * @param buffer - The buffer to check (only first 8 bytes are needed) * @returns true if AIT format */ readonly isAIT: (buffer: Uint8Array) => boolean; /** * Check if the buffer represents a ZIP format. * * @param buffer - The buffer to check (only first 4 bytes are needed) * @returns true if ZIP format */ readonly isZIP: (buffer: Uint8Array) => boolean; }; //# sourceMappingURL=format.d.ts.map