export interface TarFileEntry { /** Path inside the archive, e.g. `package/lib/index.js`. */ name: string; /** File contents (Uint8Array for binary, string is UTF-8 encoded). */ body: Uint8Array | string; /** File mode (octal). Default 0o644 (regular), 0o755 (executable inferred from leading shebang). */ mode?: number; /** Modification time (Unix epoch seconds). Default 0 for deterministic output. */ mtime?: number; } export interface TarDirEntry { /** Directory path (trailing slash optional — the writer normalizes). */ name: string; mode?: number; mtime?: number; } export type TarWriteEntry = TarFileEntry | (TarDirEntry & { directory: true; }); /** * Build an in-memory tar archive (uncompressed). For `.tar.gz` output, pipe * through gzip after — Node has `node:zlib::gzipSync`; under GJS there's * `Gio.ZlibCompressor` (use `@gjsify/zlib`'s gzipSync wrapper). * * Entries are emitted in the given order. Each file body is 512-block-padded * with zeros; the archive ends with two zero blocks per the ustar spec. */ export declare function createTarball(entries: readonly TarWriteEntry[]): Uint8Array;