#diff

no-std multidiff

Diff an arbitary number of inputs

1 unstable release

0.0.0 Dec 23, 2023

#220 in #diff

Zlib OR Apache-2.0 OR MIT

5KB
54 lines

Diff an arbitary number of inputs

Fundamentally, it works by constructing an input matrix like:

Key Data
0 aab
1 baa
2 bc
3 abc

And producing an output matrix like (may vary depending on algorithm details):

Char Appears In
a 0, 3
a 0
b 0, 1, 2, 3
a 1
a 1
c 2, 3

Note how this can encode the same information as a diff between just two elements:

Key Data
old aabc
new baac
Char Appears In
b new
a old, new
a old, new
b old
c old, new
+b
 a
 a
-b
 c

Dependencies

~185KB