yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
rom_diff.h
Go to the documentation of this file.
1#ifndef YAZE_ROM_ROM_DIFF_H
2#define YAZE_ROM_ROM_DIFF_H
3
4#include <cstddef>
5#include <cstdint>
6#include <utility>
7#include <vector>
8
9namespace yaze::rom {
10
11// Summary of byte-level differences between two ROM buffers.
12//
13// Ranges use PC offsets with half-open semantics: [start, end).
16 std::vector<std::pair<uint32_t, uint32_t>> ranges;
17};
18
19// Compute contiguous diff ranges between `before` and `after`.
20//
21// Notes:
22// - If sizes differ, the extra tail is reported as a single range.
23// - `total_bytes_changed` counts the number of differing positions, plus any
24// size delta.
25DiffSummary ComputeDiffRanges(const std::vector<uint8_t>& before,
26 const std::vector<uint8_t>& after);
27
28} // namespace yaze::rom
29
30#endif // YAZE_ROM_ROM_DIFF_H
31
DiffSummary ComputeDiffRanges(const std::vector< uint8_t > &before, const std::vector< uint8_t > &after)
Definition rom_diff.cc:11
std::vector< std::pair< uint32_t, uint32_t > > ranges
Definition rom_diff.h:16