28 const auto rewritten = entity.write();
32 report,
"compare", *divergence);
41 template <ClientVersion V>
44 const auto raw =
fs.readFile(
FileKey{path});
49 return roundtripParsed(root, *raw, report);
57 template <ClientVersion V>
60 const auto raw =
fs.readFile(
FileKey{path});
65 return roundtripParsed(entity, *raw, report);
74 return roundtripWdt<V>(
fs, path);
85 return roundtripWdl<V>(
fs, path);
Internals of the round-trip audit (namespace wowlib::audit::detail): the per-format driver class — on...
RoundtripReport failWith(RoundtripReport &report, std::string stage, std::string error)
Mark report failed in place and hand it back — keeps the unknown-chunk tally gathered before the fail...
std::optional< RoundtripReport > classifyRead(RoundtripReport &report, std::string stage, const Result< FileBuffer > &result)
Classify a client-file read for the audit: content behind an unknown TACT key and zero-byte archive e...
bool withVersion(const ClientVersion v, F &&f)
Invoke f with the targeted release constant matching v as a compile-time template argument — the runt...
constexpr bool versionSupported(std::span< const ClientVersion > grid, const ClientVersion v)
Whether a format's instantiation grid carries v — the per-format if constexpr guard of the version di...
RoundtripReport skipped(std::string_view reason)
A skipped outcome — ok, tagged with the reason.
std::optional< std::string > firstDivergenceChunked(const FileBuffer &original, const FileBuffer &rewritten)
The first byte divergence between an original chunk stream and its rewrite, located within the enclos...
RoundtripReport guarded(F &&f)
Run one file's driver, converting any escaping exception into a failed outcome — one pathological fil...
void tallyUnknown(RoundtripReport &report, const formats::ChunkExtras &extras, formats::FourCCEndian endian=formats::FourCCEndian::Reversed)
Append every unmodeled chunk of a parsed entity to the report's tally, one fourcc spelling per occurr...
RoundtripReport unrecognizedVersion(const ClientVersion v)
The dispatch-failure outcome for a version outside the targeted releases.
std::vector< std::byte > FileBuffer
Owning byte buffer for file contents read out of a client storage.
The WDL entity (namespace wowlib::formats::wdl): a map's low-resolution heightmap — the background mo...
The WDT entity (namespace wowlib::formats::wdt): a map description — the main .wdt file plus its era'...