libxdiff/README.md
2025-08-31 18:49:38 +03:00

847 B

libxdiff

A D wrapper around the C libxdiff: thin bindings (xdiff.d) + a small OO layer (MMFile, MMBlocks) for diff/patch/merge with clear ownership.

Features

  • MMFile — compact in-memory file (single buffer).
  • MMBlocks — native libxdiff block chain with compaction.
  • computePatch, applyPatch (returns accepted + rejected parts).
  • merge3Raw (three-way merge) with nothrow callbacks.
  • Deep copies where needed, explicit move of ownership, no double-free traps.

Installation

Add to dub.json:

{
    "dependencies": {
        "libxdiff": "~>0.1.0"
    }
}

Or to dub.sdl:

dependency "libxdiff" version="~>0.1.0"

Run dub build.

Usage

Import the module: import libxdiff;

License

Boost Software License 1.0. See LICENSE.