Expand description
Codec-aware diff, patch, invert, commute, and merge behavior.
Claw VCS uses codecs so different content types can have appropriate merge semantics. Built-in codecs cover line-oriented text, structural JSON, and binary replacement.
§Example
use claw_patch::text_line::TextLineCodec;
use claw_patch::Codec;
let codec = TextLineCodec;
let old = b"first\nsecond\nthird\n";
let new = b"first\nchanged\nthird\n";
let ops = codec.diff(old, new)?;
let applied = codec.apply(old, &ops)?;
assert_eq!(applied, new);Re-exports§
pub use codec::Codec;pub use error::PatchError;pub use registry::CodecRegistry;