Format-aware diff, three-way merge, and patch for files that line-based tools handle badly.
Images, archives, structured data, PDFs, databases, and 3-D meshes — parsed into their semantic
units and merged unit by unit, then written back as a valid file. One C++ tool, splinter, that
runs standalone and as a Git textconv, diff driver, and merge driver.
There are no binary releases yet, so you build from source. Clone the repository and follow BUILDING.md — it's C++20 with CMake and vcpkg.
# over HTTPS git clone https://github.com/AlphaPixel/SemanticSplinter.git # or with the GitHub CLI gh repo clone AlphaPixel/SemanticSplinter
The tool lands at build/<preset>/src/cli/Release/splinter
(splinter.exe on Windows). splinter --version prints the version for bug reports.
A one-pixel edit to a PNG changes most of its compressed bytes. Git shows "Binary files differ" and cannot merge two artists' edits to different parts of the same image. Splinter parses each format into its semantic units — pixels, chunks, archive members, XML elements, JSON keys, table rows, PDF objects — diffs and merges those, and writes a valid file back.
splinter a.png b.png behaves like diff, -m like diff3 -m, -P like patch; exit codes follow the tool being emulated.splinter old.png new.png # changed regions, metrics, metadata splinter -u old.png new.png # unified diff over canonical dump lines splinter --json=report.json a.png b.png # machine-readable report splinter -m mine.png base.png theirs.png # three-way merge, as diff3 -m splinter -m mine.zip base.zip theirs.zip # members merged by path, each by its format splinter -m mine.db base.db theirs.db # SQLite: rows by key, cells merged splinter --binary a.png b.png > logo.patch # an applicable semantic patch splinter -P < logo.patch # apply it, as patch splinter git-setup # wire up as Git diff + merge driver
Every format below diffs and merges today. Patch output and per-format limits are tracked in the format documents.