import type { Stamp } from './types.js'; export declare function expandJsonRecords(text: string, stamp?: Stamp): string; export declare function expandTapRecords(text: string, stamp?: Stamp): string; /** * Rebuilds the original from the search-hunk encoding. * * REPLACES A DECODER THAT ONLY READ THE RARE HALF OF THE FORMAT. * `search-declarations.test.ts` carried a `reconstruct` that returned any * header without `[exact declaration rows:` unchanged, as a line of text -- * and the declaration table needs 64 uniform lines, so the engine's ordinary * output, a path stated once over a hunk of content, was never reconstructed * by anything. The round trip it appeared to prove was the one case the * encoder is least likely to reach. * * Both halves are read here. The separator is not stored per line, so it is * derived the way the encoder wrote it: `:` for a line the header calls * matched, `-` for one it does not. */ export declare function expandSearchHunks(text: string, stamp?: Stamp): string; export declare function expandJsonRecordsByPosition(text: string, stamp?: Stamp): string; /** * Applies every registered grammar, then refuses anything left over. * * `expandLog` already refuses an unrecognised `[... ` envelope; this adds the * same refusal for the json marker families, which do not use that prefix and * would otherwise survive as ordinary-looking lines. */ /** * Rebuilds the sections the lossless branch of `foldRepeatedSegments` folded. * * The encoder kept one copy of each distinct section, joined them with the * single newline its cut consumed, and wrote where every section stood. So the * inverse is exact: re-cut on the same boundary, then read the order back. * * DECLINES RATHER THAN GUESSES. A vector that does not describe the sections * actually present is not something to repair -- rebuilding a document in the * wrong order would be silently wrong output, which is worse than a refusal. * Leaving the marker in place is the refusal: `rehydrate` below then throws on * it as an unconsumed marker instead of returning a plausible wrong answer. */ export declare function expandFoldedSections(text: string, stamp?: Stamp): string; export declare function rehydrate(text: string, stamp?: Stamp): string; /** * A rehydrator for a WHOLE payload: blocks handed over in the order a reader * meets them, each rebuilt with the ones above it in hand. * * `rehydrate` answers "rebuild this block from this block", which is the right * question for every engine that compresses a block in place. It is the wrong * question for a back-reference. `dedupBlocks` and `dedupImages` remove a * repeat and point at the copy still standing further up the SAME request, so * the content is in the output -- it is simply not in the fragment holding the * marker. Asked block by block the decoder refused, correctly and uselessly, * and three by-design references sat on a list of suspected data loss. * * STILL THE STRICT ORACLE. A marker naming nothing above, or naming two things, * throws. Resolving it to a guess would be the too-forgiving decoder this * module exists to avoid, and the guess would be silent. * * `images` is the one thing a text-only reader cannot work out for itself: an * image back-reference counts DISTINCT images, and telling an image block from * a text block needs the structure the payload was parsed from. The caller * passes their data in order of first appearance -- read off the output, where * the first copy of each one is still present. */ export declare function rehydrateSequence(images?: readonly string[]): (block: string, stamp?: Stamp) => string; //# sourceMappingURL=rehydrate.d.ts.map