/** * Pure-Node `ar` archive + ustar tar codec — the two file formats a `.deb` * package is built from (`ar` as the outer container holding * `debian-binary` / `control.tar.gz` / `data.tar.gz`; ustar for each of * those `.tar.gz` members). No `dpkg-deb`/`ar`/`tar` binary dependency, so * `murasaki installer --target linux-*` (installer.ts's `installerLinux`, * the caller) cross-builds a `.deb` from any host the same way `bundle * --target linux-*` already does. gzip is `node:zlib`'s built-in * `gzipSync`/`gunzipSync` — callers compress the plain tar this module * writes themselves (kept separate so tests can inspect the uncompressed * tar structure directly). */ export interface ArEntry { name: string; data: Buffer; } /** * Writes a Unix `ar` archive: the `"!\n"` magic, then one 60-byte * header + payload per entry (payload padded to an even byte count with a * trailing `\n`, per the format's own alignment rule). Every murasaki * `.deb` has exactly three entries — `debian-binary`, `control.tar.gz`, * `data.tar.gz` — in that order (installer.ts's `installerLinux` assembles * them); this codec itself doesn't assume any particular entry set. */ export declare function writeArArchive(entries: ArEntry[]): Buffer; /** * Reads back an `ar` archive written by `writeArArchive` — used by * linux-deb.test.mjs for a structural round-trip without shelling out to * `ar`/`dpkg-deb`. */ export declare function readArArchive(buffer: Buffer): ArEntry[]; export interface TarEntry { /** POSIX-style relative path (e.g. `"./usr/bin/app"` or `"."`). */ path: string; type: 'file' | 'directory'; mode: number; mtime?: number; data?: Buffer; } export interface ReadTarEntry { path: string; type: 'file' | 'directory'; mode: number; mtime: number; data: Buffer; } /** * Writes a plain (uncompressed) ustar tar stream — POSIX IEEE 1003.1-2001 * ustar, the format every modern `tar` reads, using the `prefix` field for * any path longer than 100 bytes (see `splitUstarPath`). */ export declare function writeUstarTar(entries: TarEntry[]): Buffer; /** * Reads back a ustar tar stream written by `writeUstarTar` — used by * linux-deb.test.mjs for a structural round-trip without shelling out to * `tar`, and by installer.ts's md5sums generation (which needs the exact * file set/paths that ended up in `data.tar`). */ export declare function readUstarTar(buffer: Buffer): ReadTarEntry[]; //# sourceMappingURL=deb.d.ts.map