On Tue, Nov 19, 2024, at 12:14, Steffen Nurpmeso wrote:
> I wondered for myself how the bsdiff algorithm would work out for
> such things.  

This is basically the bsdiff algorithm, but with the syntax converted to be 
something human readable and header safe.

And obviously, only applied to the message body -  headers get all sorts of 
trace stuff and re-ordering applied.

Bron.

Here's a body diff in bsdiff format for the example JMAP mailing list post on 
in the repo - just of the body parts:

brong@elg:~/src/dkim2/examples$ hexdump -C o
00000000  42 53 44 49 46 46 34 30  36 00 00 00 00 00 00 00  |BSDIFF406.......|
00000010  2c 00 00 00 00 00 00 00  d3 06 00 00 00 00 00 00  |,...............|
00000020  42 5a 68 39 31 41 59 26  53 59 02 b7 d3 b0 00 00  |BZh91AY&SY......|
00000030  01 c0 c2 69 14 00 10 40  00 08 00 20 00 31 06 4c  |...i...@... .1.L|
00000040  40 d3 4d 1a 68 99 e4 2a  a0 22 39 3c 5d c9 14 e1  |@.M.h..*."9<]...|
00000050  42 40 0a df 4e c0 42 5a  68 39 31 41 59 26 53 59  |[email protected]&SY|
00000060  18 15 27 b0 00 00 03 40  02 c0 00 02 00 00 08 20  |..'....@....... |
00000070  00 30 cc 08 9a 43 40 bc  5d c9 14 e1 42 40 60 54  |.0...C@.]...B@`T|
00000080  9e c0 42 5a 68 39 17 72  45 38 50 90 00 00 00 00  |..BZh9.rE8P.....|
00000090

And the same as an example header:

DKIM2-Diff-Body: i=1;
                 c=0-1747

(and the diff with a regular text diff)

brong@elg:~/src/dkim2/examples$ diff b a
1,3d0
< --===============5385250436117681394==
< Content-Type: multipart/alternative; boundary=12b53dc829d24511bfa04f7d5e3675f8
<
45,58d41
<
<
< --===============5385250436117681394==
< Content-Type: text/plain; charset="us-ascii"
< MIME-Version: 1.0
< Content-Transfer-Encoding: 7bit
< Content-Disposition: inline
<
< _______________________________________________
< Jmap mailing list
< [email protected]
< https://www.ietf.org/mailman/listinfo/jmap
<
< --===============5385250436117681394==--

Bron.

--
  Bron Gondwana, CEO, Fastmail Pty Ltd
  [email protected]

_______________________________________________
Ietf-dkim mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to