/** * Deterministic POSIX ustar reader/writer for the policy-bundle primitive. * * This is a minimal, dependency-free tar implementation scoped to what the * policy-bundle format needs: regular files only, no symlinks, no devices, * no PAX extensions. It is deterministic by construction so that the same * file set always serializes to the same bytes, which is required for the * content-addressed bundle hash to be stable. * * Determinism rules applied here: * - entries are sorted by name (Unicode code point) before writing * - mtime, uid, gid, uname, gname are fixed to constant values * - file mode is fixed to 0o644 * * This is a FORMAT primitive only. It is not a general archiver and is not a * tar service. It reads and writes a byte array in memory. */ /** A single regular-file entry inside a policy-bundle tar. */ export interface TarEntry { /** POSIX path inside the archive (forward slashes, no leading slash). */ name: string; /** Raw file bytes. */ data: Uint8Array; } /** * Serialize a set of entries into a deterministic ustar byte array. * Entries are sorted by name before writing. Two equal file sets always * produce identical bytes. */ export declare function packTar(entries: TarEntry[]): Uint8Array; /** * Parse a ustar byte array back into entries. Validates each header * checksum so a corrupted archive is rejected at read time. Only regular * files (typeflag '0' or '\0') are accepted. */ export declare function unpackTar(archive: Uint8Array): TarEntry[]; //# sourceMappingURL=tar.d.ts.map