39 lines
847 B
Markdown
39 lines
847 B
Markdown
# libxdiff
|
|
|
|
A D wrapper around the C **libxdiff**: thin bindings ([xdiff.d](https://git.zhirov.kz/dlang/xdiff)) + 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`:
|
|
|
|
```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](LICENSE).
|