Which lines of a memory document survive a rewrite? A deterministic model you can check against a real compaction.