Hex Artifact Content
Not logged in

Artifact 403bbf0aacfe1fddc00ae69f305e1e06aae69e04:

File www/delta_format.html part of check-in [5fcb36c81b] - Added documentation of the delta format by aku on 2007-08-26 01:32:11. Also file www/delta_format.html part of check-in [452a71f40b] - Merge in aku's documentation updates. by drh on 2007-08-26 03:03:58.

0000: 3c 68 74 6d 6c 3e 0a 3c 68 65 61 64 3e 0a 3c 74  <html>.<head>.<t
0010: 69 74 6c 65 3e 46 6f 73 73 69 6c 20 44 65 6c 74  itle>Fossil Delt
0020: 61 20 46 6f 72 6d 61 74 3c 2f 74 69 74 6c 65 3e  a Format</title>
0030: 0a 3c 2f 68 65 61 64 3e 0a 3c 62 6f 64 79 20 62  .</head>.<body b
0040: 67 63 6f 6c 6f 72 3d 22 77 68 69 74 65 22 3e 0a  gcolor="white">.
0050: 3c 68 31 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <h1 align="cente
0060: 72 22 3e 0a 46 6f 73 73 69 6c 20 44 65 6c 74 61  r">.Fossil Delta
0070: 20 46 6f 72 6d 61 74 0a 3c 2f 68 31 3e 0a 0a 3c   Format.</h1>..<
0080: 70 3e 41 20 6b 65 79 20 63 6f 6d 70 6f 6e 65 6e  p>A key componen
0090: 74 20 66 6f 72 20 74 68 65 20 65 66 66 69 63 69  t for the effici
00a0: 65 6e 74 20 73 74 6f 72 61 67 65 20 6f 66 20 6d  ent storage of m
00b0: 75 6c 74 69 70 6c 65 20 72 65 76 69 73 69 6f 6e  ultiple revision
00c0: 73 20 6f 66 0a 61 20 66 69 6c 65 20 69 6e 20 66  s of.a file in f
00d0: 6f 73 73 69 6c 20 72 65 70 6f 73 69 74 6f 72 69  ossil repositori
00e0: 65 73 20 69 73 20 74 68 65 20 75 73 65 20 6f 66  es is the use of
00f0: 20 64 65 6c 74 61 2d 63 6f 6d 70 72 65 73 73 69   delta-compressi
0100: 6f 6e 2c 20 69 2e 65 2e 20 74 6f 0a 73 74 6f 72  on, i.e. to.stor
0110: 65 20 6f 6e 6c 79 20 74 68 65 20 63 68 61 6e 67  e only the chang
0120: 65 73 20 62 65 74 77 65 65 6e 20 72 65 76 69 73  es between revis
0130: 69 6f 6e 73 20 69 6e 73 74 65 61 64 20 6f 66 20  ions instead of 
0140: 74 68 65 20 77 68 6f 6c 65 0a 66 69 6c 65 2e 3c  the whole.file.<
0150: 2f 70 3e 0a 0a 3c 70 3e 54 68 69 73 20 64 6f 63  /p>..<p>This doc
0160: 75 6d 65 6e 74 20 64 65 73 63 72 69 62 65 73 20  ument describes 
0170: 74 68 65 20 66 6f 72 6d 61 74 20 75 73 65 64 20  the format used 
0180: 74 6f 20 65 6e 63 6f 64 65 20 73 75 63 68 20 63  to encode such c
0190: 68 61 6e 67 65 73 2c 0a 61 6c 73 6f 20 6b 6e 6f  hanges,.also kno
01a0: 77 6e 20 61 73 20 22 64 65 6c 74 61 22 2e 20 49  wn as "delta". I
01b0: 74 20 69 73 20 74 61 72 67 65 74 65 64 20 61 74  t is targeted at
01c0: 20 64 65 76 65 6c 6f 70 65 72 73 20 77 6f 72 6b   developers work
01d0: 69 6e 67 20 6f 6e 20 65 69 74 68 65 72 0a 3c 61  ing on either.<a
01e0: 20 68 72 65 66 3d 22 69 6e 64 65 78 2e 68 74 6d   href="index.htm
01f0: 6c 22 3e 66 6f 73 73 69 6c 3c 2f 61 3e 20 69 74  l">fossil</a> it
0200: 73 65 6c 66 2c 20 6f 72 20 6f 6e 20 74 6f 6f 6c  self, or on tool
0210: 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74  s compatible wit
0220: 68 0a 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 32 3e 53  h.it.</p>..<h2>S
0230: 74 72 75 63 74 75 72 65 3c 2f 68 32 3e 0a 3c 69  tructure</h2>.<i
0240: 6d 67 20 73 72 63 3d 22 64 65 6c 74 61 31 2e 67  mg src="delta1.g
0250: 69 66 22 20 61 6c 69 67 6e 3d 22 6c 65 66 74 22  if" align="left"
0260: 20 68 73 70 61 63 65 3d 22 31 30 22 3e 0a 0a 3c   hspace="10">..<
0270: 70 3e 41 20 64 65 6c 74 61 20 63 6f 6e 73 69 73  p>A delta consis
0280: 74 73 20 6f 66 20 74 68 72 65 65 20 70 61 72 74  ts of three part
0290: 73 2c 20 61 20 22 68 65 61 64 65 72 22 2c 20 61  s, a "header", a
02a0: 20 22 74 72 61 69 6c 65 72 22 2c 20 61 6e 64 20   "trailer", and 
02b0: 61 0a 22 73 65 67 6d 65 6e 74 2d 6c 69 73 74 22  a."segment-list"
02c0: 20 62 65 74 77 65 65 6e 20 74 68 65 6d 2e 3c 2f   between them.</
02d0: 70 3e 0a 0a 3c 70 3e 42 6f 74 68 20 68 65 61 64  p>..<p>Both head
02e0: 65 72 20 61 6e 64 20 74 72 61 69 6c 65 72 20 70  er and trailer p
02f0: 72 6f 76 69 64 65 20 69 6e 66 6f 72 6d 61 74 69  rovide informati
0300: 6f 6e 20 61 62 6f 75 74 20 74 68 65 20 74 61 72  on about the tar
0310: 67 65 74 0a 68 65 6c 70 69 6e 67 20 74 68 65 20  get.helping the 
0320: 64 65 63 6f 64 65 72 2c 20 61 6e 64 20 74 68 65  decoder, and the
0330: 20 73 65 67 6d 65 6e 74 2d 6c 69 73 74 20 64 65   segment-list de
0340: 73 63 72 69 62 65 73 20 68 6f 77 20 74 68 65 20  scribes how the 
0350: 74 61 72 67 65 74 20 63 61 6e 0a 62 65 20 63 6f  target can.be co
0360: 6e 73 74 72 75 63 74 65 64 20 66 72 6f 6d 20 74  nstructed from t
0370: 68 65 20 6f 72 69 67 69 6e 61 6c 2e 3c 2f 70 3e  he original.</p>
0380: 0a 0a 3c 68 33 3e 48 65 61 64 65 72 3c 2f 68 33  ..<h3>Header</h3
0390: 3e 0a 3c 69 6d 67 20 73 72 63 3d 22 64 65 6c 74  >.<img src="delt
03a0: 61 36 2e 67 69 66 22 20 61 6c 69 67 6e 3d 22 6c  a6.gif" align="l
03b0: 65 66 74 22 20 68 73 70 61 63 65 3d 22 31 30 22  eft" hspace="10"
03c0: 3e 0a 0a 3c 70 3e 54 68 65 20 68 65 61 64 65 72  >..<p>The header
03d0: 20 63 6f 6e 73 69 73 74 73 20 6f 66 20 61 20 73   consists of a s
03e0: 69 6e 67 6c 65 20 6e 75 6d 62 65 72 20 66 6f 6c  ingle number fol
03f0: 6c 6f 77 65 64 20 62 79 20 61 20 6e 65 77 6c 69  lowed by a newli
0400: 6e 65 0a 63 68 61 72 61 63 74 65 72 20 28 41 53  ne.character (AS
0410: 43 49 49 20 30 78 30 61 29 2e 20 54 68 65 20 6e  CII 0x0a). The n
0420: 75 6d 62 65 72 20 69 73 20 74 68 65 20 6c 65 6e  umber is the len
0430: 67 74 68 20 6f 66 20 74 68 65 20 74 61 72 67 65  gth of the targe
0440: 74 20 69 6e 0a 62 79 74 65 73 2e 3c 2f 70 3e 0a  t in.bytes.</p>.
0450: 0a 3c 70 3e 54 68 69 73 20 6d 65 61 6e 73 20 74  .<p>This means t
0460: 68 61 74 2c 20 67 69 76 65 6e 20 61 20 64 65 6c  hat, given a del
0470: 74 61 2c 20 74 68 65 20 64 65 63 6f 64 65 72 20  ta, the decoder 
0480: 63 61 6e 20 63 6f 6d 70 75 74 65 20 74 68 65 20  can compute the 
0490: 73 69 7a 65 20 6f 66 0a 74 68 65 20 74 61 72 67  size of.the targ
04a0: 65 74 20 28 61 6e 64 20 61 6c 6c 6f 63 61 74 65  et (and allocate
04b0: 20 61 6e 79 20 6e 65 63 65 73 73 61 72 79 20 6d   any necessary m
04c0: 65 6d 6f 72 79 20 62 61 73 65 64 20 6f 6e 20 74  emory based on t
04d0: 68 61 74 29 20 62 79 20 73 69 6d 70 6c 79 0a 72  hat) by simply.r
04e0: 65 61 64 69 6e 67 20 74 68 65 20 66 69 72 73 74  eading the first
04f0: 20 6c 69 6e 65 20 6f 66 20 74 68 65 20 64 65 6c   line of the del
0500: 74 61 20 61 6e 64 20 64 65 63 6f 64 69 6e 67 20  ta and decoding 
0510: 74 68 65 20 6e 75 6d 62 65 72 20 66 6f 75 6e 64  the number found
0520: 0a 74 68 65 72 65 2e 20 49 6e 20 6f 74 68 65 72  .there. In other
0530: 20 77 6f 72 64 73 2c 20 62 65 66 6f 72 65 20 69   words, before i
0540: 74 20 68 61 73 20 74 6f 20 64 65 63 6f 64 65 20  t has to decode 
0550: 65 76 65 72 79 74 68 69 6e 67 20 65 6c 73 65 2e  everything else.
0560: 3c 2f 70 3e 0a 0a 3c 68 33 3e 54 72 61 69 6c 65  </p>..<h3>Traile
0570: 72 3c 2f 68 33 3e 0a 3c 69 6d 67 20 73 72 63 3d  r</h3>.<img src=
0580: 22 64 65 6c 74 61 35 2e 67 69 66 22 20 61 6c 69  "delta5.gif" ali
0590: 67 6e 3d 22 6c 65 66 74 22 20 68 73 70 61 63 65  gn="left" hspace
05a0: 3d 22 31 30 22 3e 0a 0a 3c 70 3e 54 68 65 20 74  ="10">..<p>The t
05b0: 72 61 69 6c 65 72 20 63 6f 6e 73 69 73 74 73 20  railer consists 
05c0: 6f 66 20 61 20 73 69 6e 67 6c 65 20 6e 75 6d 62  of a single numb
05d0: 65 72 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 61  er followed by a
05e0: 20 73 65 6d 69 63 6f 6c 6f 6e 20 28 41 53 43 49   semicolon (ASCI
05f0: 49 0a 30 78 33 62 29 2e 20 54 68 69 73 20 6e 75  I.0x3b). This nu
0600: 6d 62 65 72 20 69 73 20 61 20 63 68 65 63 6b 73  mber is a checks
0610: 75 6d 20 6f 66 20 74 68 65 20 74 61 72 67 65 74  um of the target
0620: 20 61 6e 64 20 63 61 6e 20 62 65 20 75 73 65 64   and can be used
0630: 20 62 79 20 61 0a 64 65 63 6f 64 65 72 20 74 6f   by a.decoder to
0640: 20 76 65 72 69 66 79 20 74 68 61 74 20 74 68 65   verify that the
0650: 20 64 65 6c 74 61 20 61 70 70 6c 69 65 64 20 63   delta applied c
0660: 6f 72 72 65 63 74 6c 79 2c 20 72 65 63 6f 6e 73  orrectly, recons
0670: 74 72 75 63 74 69 6e 67 20 74 68 65 0a 74 61 72  tructing the.tar
0680: 67 65 74 20 66 72 6f 6d 20 74 68 65 20 6f 72 69  get from the ori
0690: 67 69 6e 61 6c 2e 3c 2f 70 3e 0a 0a 3c 70 3e 54  ginal.</p>..<p>T
06a0: 68 65 20 63 68 65 63 6b 73 75 6d 20 69 73 20 63  he checksum is c
06b0: 6f 6d 70 75 74 65 64 20 62 79 20 74 72 65 61 74  omputed by treat
06c0: 69 6e 67 20 74 68 65 20 74 61 72 67 65 74 20 61  ing the target a
06d0: 73 20 61 20 73 65 72 69 65 73 20 6f 66 0a 33 32  s a series of.32
06e0: 2d 62 69 74 20 69 6e 74 65 67 65 72 20 6e 75 6d  -bit integer num
06f0: 62 65 72 73 20 28 4d 53 42 20 66 69 72 73 74 29  bers (MSB first)
0700: 2c 20 61 6e 64 20 73 75 6d 6d 69 6e 67 20 74 68  , and summing th
0710: 65 73 65 20 75 70 2c 20 6d 6f 64 75 6c 6f 0a 32  ese up, modulo.2
0720: 5e 33 32 2d 31 2e 20 41 20 74 61 72 67 65 74 20  ^32-1. A target 
0730: 77 68 6f 73 65 20 6c 65 6e 67 74 68 20 69 73 20  whose length is 
0740: 6e 6f 74 20 61 20 6d 75 6c 74 69 70 6c 65 20 6f  not a multiple o
0750: 66 20 34 20 69 73 20 70 61 64 64 65 64 20 77 69  f 4 is padded wi
0760: 74 68 0a 30 2d 62 79 74 65 73 20 28 41 53 43 49  th.0-bytes (ASCI
0770: 49 20 30 78 30 30 29 20 61 74 20 74 68 65 20 65  I 0x00) at the e
0780: 6e 64 2e 3c 2f 70 3e 0a 0a 3c 70 3e 42 79 20 70  nd.</p>..<p>By p
0790: 75 74 74 69 6e 67 20 74 68 69 73 20 69 6e 66 6f  utting this info
07a0: 72 6d 61 74 69 6f 6e 20 61 74 20 74 68 65 20 65  rmation at the e
07b0: 6e 64 20 6f 66 20 74 68 65 20 64 65 6c 74 61 20  nd of the delta 
07c0: 61 20 64 65 63 6f 64 65 72 20 68 61 73 0a 69 74  a decoder has.it
07d0: 20 61 76 61 69 6c 61 62 6c 65 20 69 6d 6d 65 64   available immed
07e0: 69 61 74 65 6c 79 20 61 66 74 65 72 20 74 68 65  iately after the
07f0: 20 74 61 72 67 65 74 20 68 61 73 20 62 65 65 6e   target has been
0800: 20 72 65 63 6f 6e 73 74 72 75 63 74 65 64 0a 66   reconstructed.f
0810: 75 6c 6c 79 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 53  ully.</p>..<h3>S
0820: 65 67 6d 65 6e 74 2d 4c 69 73 74 3c 2f 68 33 3e  egment-List</h3>
0830: 0a 3c 69 6d 67 20 73 72 63 3d 22 64 65 6c 74 61  .<img src="delta
0840: 32 2e 67 69 66 22 20 61 6c 69 67 6e 3d 22 6c 65  2.gif" align="le
0850: 66 74 22 20 68 73 70 61 63 65 3d 22 31 30 22 3e  ft" hspace="10">
0860: 0a 0a 3c 70 3e 54 68 65 20 73 65 67 6d 65 6e 74  ..<p>The segment
0870: 2d 6c 69 73 74 20 6f 66 20 61 20 64 65 6c 74 61  -list of a delta
0880: 20 64 65 73 63 72 69 62 65 73 20 68 6f 77 20 74   describes how t
0890: 6f 20 63 72 65 61 74 65 20 74 68 65 20 74 61 72  o create the tar
08a0: 67 65 74 20 66 72 6f 6d 0a 74 68 65 20 6f 72 69  get from.the ori
08b0: 67 69 6e 61 6c 20 62 79 20 61 20 63 6f 6d 62 69  ginal by a combi
08c0: 6e 61 74 69 6f 6e 20 6f 66 20 69 6e 73 65 72 74  nation of insert
08d0: 69 6e 67 20 6c 69 74 65 72 61 6c 20 62 79 74 65  ing literal byte
08e0: 2d 73 65 71 75 65 6e 63 65 73 20 61 6e 64 0a 63  -sequences and.c
08f0: 6f 70 79 69 6e 67 20 72 61 6e 67 65 73 20 6f 66  opying ranges of
0900: 20 62 79 74 65 73 20 66 72 6f 6d 20 74 68 65 20   bytes from the 
0910: 6f 72 69 67 69 6e 61 6c 2e 20 54 68 69 73 20 69  original. This i
0920: 73 20 74 68 65 72 65 20 74 68 65 0a 63 6f 6d 70  s there the.comp
0930: 72 65 73 73 69 6f 6e 20 74 61 6b 65 73 20 70 6c  ression takes pl
0940: 61 63 65 2c 20 62 79 20 65 6e 63 6f 64 69 6e 67  ace, by encoding
0950: 20 74 68 65 20 6c 61 72 67 65 20 63 6f 6d 6d 6f   the large commo
0960: 6e 20 70 61 72 74 73 20 6f 66 0a 6f 72 69 67 69  n parts of.origi
0970: 6e 61 6c 20 61 6e 64 20 74 61 72 67 65 74 20 69  nal and target i
0980: 6e 20 73 6d 61 6c 6c 20 63 6f 70 79 20 69 6e 73  n small copy ins
0990: 74 72 75 63 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a  tructions.</p>..
09a0: 3c 70 3e 54 68 65 20 74 61 72 67 65 74 20 69 73  <p>The target is
09b0: 20 63 6f 6e 73 74 72 75 63 74 65 64 20 66 72 6f   constructed fro
09c0: 6d 20 62 65 67 69 6e 6e 69 6e 67 20 74 6f 20 65  m beginning to e
09d0: 6e 64 2c 20 77 69 74 68 20 74 68 65 20 64 61 74  nd, with the dat
09e0: 61 0a 67 65 6e 65 72 61 74 65 64 20 62 79 20 65  a.generated by e
09f0: 61 63 68 20 69 6e 73 74 72 75 63 74 69 6f 6e 20  ach instruction 
0a00: 61 70 70 65 6e 64 65 64 20 61 66 74 65 72 20 74  appended after t
0a10: 68 65 20 64 61 74 61 20 6f 66 20 61 6c 6c 20 70  he data of all p
0a20: 72 65 76 69 6f 75 73 0a 69 6e 73 74 72 75 63 74  revious.instruct
0a30: 69 6f 6e 73 2c 20 77 69 74 68 20 6e 6f 20 67 61  ions, with no ga
0a40: 70 73 2e 3c 2f 70 3e 0a 0a 3c 68 34 3e 49 6e 73  ps.</p>..<h4>Ins
0a50: 65 72 74 20 4c 69 74 65 72 61 6c 3c 2f 68 34 3e  ert Literal</h4>
0a60: 0a 0a 3c 70 3e 41 20 6c 69 74 65 72 61 6c 20 69  ..<p>A literal i
0a70: 73 20 73 70 65 63 69 66 69 65 64 20 62 79 20 74  s specified by t
0a80: 77 6f 20 65 6c 65 6d 65 6e 74 73 2c 20 74 68 65  wo elements, the
0a90: 20 73 69 7a 65 20 6f 66 20 74 68 65 20 6c 69 74   size of the lit
0aa0: 65 72 61 6c 20 69 6e 0a 62 79 74 65 73 2c 20 61  eral in.bytes, a
0ab0: 6e 64 20 74 68 65 20 62 79 74 65 73 20 6f 66 20  nd the bytes of 
0ac0: 74 68 65 20 6c 69 74 65 72 61 6c 20 69 74 73 65  the literal itse
0ad0: 6c 66 2e 3c 2f 70 3e 0a 0a 3c 69 6d 67 20 73 72  lf.</p>..<img sr
0ae0: 63 3d 22 64 65 6c 74 61 34 2e 67 69 66 22 20 61  c="delta4.gif" a
0af0: 6c 69 67 6e 3d 22 6c 65 66 74 22 20 68 73 70 61  lign="left" hspa
0b00: 63 65 3d 22 31 30 22 3e 0a 3c 70 3e 54 68 65 20  ce="10">.<p>The 
0b10: 6c 65 6e 67 74 68 20 69 73 20 77 72 69 74 74 65  length is writte
0b20: 6e 20 66 69 72 73 74 2c 20 66 6f 6c 6c 6f 77 65  n first, followe
0b30: 64 20 62 79 20 61 20 63 6f 6c 6f 6e 20 63 68 61  d by a colon cha
0b40: 72 61 63 74 65 72 20 28 41 53 43 49 49 0a 30 78  racter (ASCII.0x
0b50: 33 61 29 2c 20 66 6f 6c 6c 6f 77 65 64 20 62 79  3a), followed by
0b60: 20 74 68 65 20 62 79 74 65 73 20 6f 66 20 74 68   the bytes of th
0b70: 65 20 6c 69 74 65 72 61 6c 2e 3c 2f 70 3e 0a 0a  e literal.</p>..
0b80: 3c 68 34 3e 43 6f 70 79 20 52 61 6e 67 65 3c 2f  <h4>Copy Range</
0b90: 68 34 3e 0a 0a 3c 70 3e 41 20 72 61 6e 67 65 20  h4>..<p>A range 
0ba0: 74 6f 20 63 6f 70 79 20 69 73 20 73 70 65 63 69  to copy is speci
0bb0: 66 69 65 64 20 62 79 20 74 77 6f 20 6e 75 6d 62  fied by two numb
0bc0: 65 72 73 2c 20 74 68 65 20 6f 66 66 73 65 74 20  ers, the offset 
0bd0: 6f 66 20 74 68 65 0a 66 69 72 73 74 20 62 79 74  of the.first byt
0be0: 65 20 69 6e 20 74 68 65 20 6f 72 69 67 69 6e 61  e in the origina
0bf0: 6c 20 74 6f 20 63 6f 70 79 2c 20 61 6e 64 20 74  l to copy, and t
0c00: 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 72  he size of the r
0c10: 61 6e 67 65 2c 20 69 6e 0a 62 79 74 65 73 2e 20  ange, in.bytes. 
0c20: 54 68 65 20 73 69 7a 65 20 7a 65 72 6f 20 69 73  The size zero is
0c30: 20 73 70 65 63 69 61 6c 2c 20 69 74 73 20 75 73   special, its us
0c40: 61 67 65 20 69 6e 64 69 63 61 74 65 73 20 74 68  age indicates th
0c50: 61 74 20 74 68 65 20 72 61 6e 67 65 0a 65 78 74  at the range.ext
0c60: 65 6e 64 73 20 74 6f 20 74 68 65 20 65 6e 64 20  ends to the end 
0c70: 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 2e  of the original.
0c80: 3c 2f 70 3e 0a 0a 3c 69 6d 67 20 73 72 63 3d 22  </p>..<img src="
0c90: 64 65 6c 74 61 33 2e 67 69 66 22 20 61 6c 69 67  delta3.gif" alig
0ca0: 6e 3d 22 6c 65 66 74 22 20 68 73 70 61 63 65 3d  n="left" hspace=
0cb0: 22 31 30 22 3e 0a 3c 70 3e 54 68 65 20 6c 65 6e  "10">.<p>The len
0cc0: 67 74 68 20 69 73 20 77 72 69 74 74 65 6e 20 66  gth is written f
0cd0: 69 72 73 74 2c 20 66 6f 6c 6c 6f 77 65 64 20 62  irst, followed b
0ce0: 79 20 61 6e 20 22 61 74 22 20 63 68 61 72 61 63  y an "at" charac
0cf0: 74 65 72 20 28 41 53 43 49 49 0a 30 78 34 30 29  ter (ASCII.0x40)
0d00: 2c 20 74 68 65 6e 20 74 68 65 20 6f 66 66 73 65  , then the offse
0d10: 74 2c 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 61  t, followed by a
0d20: 20 63 6f 6d 6d 61 20 28 41 53 43 49 49 20 30 78   comma (ASCII 0x
0d30: 32 63 29 2e 3c 2f 70 3e 0a 0a 3c 68 32 3e 45 6e  2c).</p>..<h2>En
0d40: 63 6f 64 69 6e 67 20 6f 66 20 69 6e 74 65 67 65  coding of intege
0d50: 72 73 3c 2f 68 32 3e 0a 0a 3c 70 3e 0a 54 68 65  rs</h2>..<p>.The
0d60: 20 66 6f 72 6d 61 74 20 63 75 72 72 65 6e 74 6c   format currentl
0d70: 79 20 68 61 6e 64 6c 65 73 20 6f 6e 6c 79 20 33  y handles only 3
0d80: 32 20 62 69 74 20 69 6e 74 65 67 65 72 20 6e 75  2 bit integer nu
0d90: 6d 62 65 72 73 2e 20 54 68 65 79 20 61 72 65 0a  mbers. They are.
0da0: 77 72 69 74 74 65 6e 20 62 61 73 65 2d 36 34 20  written base-64 
0db0: 65 6e 63 6f 64 65 64 2c 20 4d 53 42 20 66 69 72  encoded, MSB fir
0dc0: 73 74 2c 20 61 6e 64 20 77 69 74 68 6f 75 74 20  st, and without 
0dd0: 6c 65 61 64 69 6e 67 0a 22 30 22 2d 63 68 61 72  leading."0"-char
0de0: 61 63 74 65 72 73 2c 20 65 78 63 65 70 74 20 69  acters, except i
0df0: 66 20 74 68 65 79 20 61 72 65 20 73 69 67 6e 69  f they are signi
0e00: 66 69 63 61 6e 74 20 28 69 2e 65 2e 20 30 20 3d  ficant (i.e. 0 =
0e10: 3e 20 22 30 22 29 2e 0a 3c 2f 70 3e 0a 0a 3c 70  > "0")..</p>..<p
0e20: 3e 0a 54 68 65 20 62 61 73 65 2d 36 34 20 63 6f  >.The base-64 co
0e30: 64 69 6e 67 20 69 73 20 64 65 73 63 72 69 62 65  ding is describe
0e40: 64 20 69 6e 0a 3c 61 20 68 72 65 66 3d 22 68 74  d in.<a href="ht
0e50: 74 70 3a 2f 2f 77 77 77 2e 69 65 74 66 2e 6f 72  tp://www.ietf.or
0e60: 67 2f 72 66 63 2f 72 66 63 33 35 34 38 2e 74 78  g/rfc/rfc3548.tx
0e70: 74 22 3e 52 46 43 20 33 35 34 38 3c 2f 61 3e 2e  t">RFC 3548</a>.
0e80: 0a 3c 2f 70 3e 0a 0a 3c 68 32 3e 45 78 61 6d 70  .</p>..<h2>Examp
0e90: 6c 65 73 3c 2f 68 32 3e 0a 0a 3c 68 33 3e 4e 75  les</h2>..<h3>Nu
0ea0: 6d 62 65 72 20 65 6e 63 6f 64 69 6e 67 3c 2f 68  mber encoding</h
0eb0: 33 3e 0a 0a 3c 74 61 62 6c 65 20 62 6f 72 64 65  3>..<table borde
0ec0: 72 3d 31 3e 0a 3c 74 72 3e 0a 3c 74 68 3e 56 61  r=1>.<tr>.<th>Va
0ed0: 6c 75 65 3c 2f 74 68 3e 0a 3c 74 68 3e 45 6e 63  lue</th>.<th>Enc
0ee0: 6f 64 69 6e 67 3c 2f 74 68 3e 0a 3c 2f 74 72 3e  oding</th>.</tr>
0ef0: 0a 3c 74 72 3e 0a 3c 74 64 3e 30 3c 2f 74 64 3e  .<tr>.<td>0</td>
0f00: 0a 3c 74 64 3e 30 3c 2f 74 64 3e 0a 3c 2f 74 72  .<td>0</td>.</tr
0f10: 3e 0a 3c 74 72 3e 0a 3c 74 64 3e 36 32 34 36 3c  >.<tr>.<td>6246<
0f20: 2f 74 64 3e 0a 3c 74 64 3e 31 58 62 3c 2f 74 64  /td>.<td>1Xb</td
0f30: 3e 0a 3c 2f 74 72 3e 0a 3c 74 72 3e 0a 3c 74 64  >.</tr>.<tr>.<td
0f40: 3e 2d 31 31 30 31 34 33 38 37 37 30 3c 2f 74 64  >-1101438770</td
0f50: 3e 0a 3c 74 64 3e 32 7a 4d 4d 33 45 3c 2f 74 64  >.<td>2zMM3E</td
0f60: 3e 0a 3c 2f 74 72 3e 0a 3c 2f 74 61 62 6c 65 3e  >.</tr>.</table>
0f70: 0a 0a 3c 68 33 3e 44 65 6c 74 61 3c 2f 68 33 3e  ..<h3>Delta</h3>
0f80: 0a 0a 3c 70 3e 41 6e 20 65 78 61 6d 70 6c 65 20  ..<p>An example 
0f90: 6f 66 20 61 20 64 65 6c 74 61 20 75 73 69 6e 67  of a delta using
0fa0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 65   the specified e
0fb0: 6e 63 6f 64 69 6e 67 20 69 73 3a 3c 2f 70 3e 0a  ncoding is:</p>.
0fc0: 0a 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 31  .<table border=1
0fd0: 3e 3c 74 72 3e 3c 74 64 3e 3c 70 72 65 3e 0a 31  ><tr><td><pre>.1
0fe0: 58 62 0a 34 45 40 30 2c 32 3a 74 68 46 4e 40 34  Xb.4E@0,2:thFN@4
0ff0: 43 2c 36 3a 73 63 65 6e 64 61 31 42 40 4a 64 2c  C,6:scenda1B@Jd,
1000: 36 3a 73 63 65 6e 64 61 35 78 40 4b 74 2c 36 3a  6:scenda5x@Kt,6:
1010: 70 69 65 63 65 73 37 39 40 51 74 2c 46 3a 20 45  pieces79@Qt,F: E
1020: 78 61 6d 70 6c 65 3a 20 65 73 6b 69 6c 7e 45 40  xample: eskil~E@
1030: 59 30 2c 32 7a 4d 4d 33 45 3b 3c 2f 70 72 65 3e  Y0,2zMM3E;</pre>
1040: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62  .</td></tr></tab
1050: 6c 65 3e 0a 0a 3c 70 3e 54 68 69 73 20 63 61 6e  le>..<p>This can
1060: 20 62 65 20 74 61 6b 65 6e 20 61 70 61 72 74 20   be taken apart 
1070: 69 6e 74 6f 20 74 68 65 20 66 6f 6c 6c 6f 77 69  into the followi
1080: 6e 67 20 70 61 72 74 73 3a 3c 2f 70 3e 0a 0a 3c  ng parts:</p>..<
1090: 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 31 3e 0a  table border=1>.
10a0: 3c 74 72 3e 3c 74 68 3e 57 68 61 74 20 20 3c 2f  <tr><th>What  </
10b0: 74 68 3e 20 3c 74 68 3e 45 6e 63 6f 64 69 6e 67  th> <th>Encoding
10c0: 20 20 20 20 20 20 20 20 20 3c 2f 74 68 3e 3c 74           </th><t
10d0: 68 3e 4d 65 61 6e 69 6e 67 20 3c 2f 74 68 3e 3c  h>Meaning </th><
10e0: 74 68 3e 44 65 74 61 69 6c 73 3c 2f 74 68 3e 3c  th>Details</th><
10f0: 2f 74 72 3e 0a 3c 74 72 3e 3c 74 64 3e 48 65 61  /tr>.<tr><td>Hea
1100: 64 65 72 3c 2f 74 64 3e 20 3c 74 64 3e 31 58 62  der</td> <td>1Xb
1110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f                </
1120: 74 64 3e 3c 74 64 3e 53 69 7a 65 20 20 20 20 3c  td><td>Size    <
1130: 2f 74 64 3e 3c 74 64 3e 20 36 32 34 36 09 20 20  /td><td> 6246.  
1140: 20 20 20 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74     </td></tr>.<t
1150: 72 3e 3c 74 64 3e 53 2d 4c 69 73 74 3c 2f 74 64  r><td>S-List</td
1160: 3e 20 3c 74 64 3e 34 45 40 30 2c 09 20 20 20 20  > <td>4E@0,.    
1170: 20 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 43 6f       </td><td>Co
1180: 70 79 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 20  py    </td><td> 
1190: 32 37 30 20 40 20 30 09 20 20 20 20 20 3c 2f 74  270 @ 0.     </t
11a0: 64 3e 3c 2f 74 72 3e 0a 3c 74 72 3e 3c 74 64 3e  d></tr>.<tr><td>
11b0: 26 6e 62 73 70 3b 3c 2f 74 64 3e 20 3c 74 64 3e  &nbsp;</td> <td>
11c0: 32 3a 74 68 09 20 20 20 20 20 20 20 20 20 3c 2f  2:th.         </
11d0: 74 64 3e 3c 74 64 3e 4c 69 74 65 72 61 6c 20 3c  td><td>Literal <
11e0: 2f 74 64 3e 3c 74 64 3e 20 32 20 27 74 68 27 09  /td><td> 2 'th'.
11f0: 20 20 20 20 20 3c 2f 74 64 3e 3c 2f 74 72 3e 0a       </td></tr>.
1200: 3c 74 72 3e 3c 74 64 3e 26 6e 62 73 70 3b 3c 2f  <tr><td>&nbsp;</
1210: 74 64 3e 20 3c 74 64 3e 46 4e 40 34 43 2c 09 20  td> <td>FN@4C,. 
1220: 20 20 20 20 20 20 20 20 3c 2f 74 64 3e 3c 74 64          </td><td
1230: 3e 43 6f 70 79 20 20 20 20 3c 2f 74 64 3e 3c 74  >Copy    </td><t
1240: 64 3e 20 39 38 33 20 40 20 32 36 38 09 20 20 20  d> 983 @ 268.   
1250: 20 20 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74 72    </td></tr>.<tr
1260: 3e 3c 74 64 3e 26 6e 62 73 70 3b 3c 2f 74 64 3e  ><td>&nbsp;</td>
1270: 20 3c 74 64 3e 36 3a 73 63 65 6e 64 61 20 20 20   <td>6:scenda   
1280: 20 20 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 4c        </td><td>L
1290: 69 74 65 72 61 6c 20 3c 2f 74 64 3e 3c 74 64 3e  iteral </td><td>
12a0: 20 36 20 27 73 63 65 6e 64 61 27 09 20 20 20 20   6 'scenda'.    
12b0: 20 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74 72 3e   </td></tr>.<tr>
12c0: 3c 74 64 3e 26 6e 62 73 70 3b 3c 2f 74 64 3e 20  <td>&nbsp;</td> 
12d0: 3c 74 64 3e 31 42 40 4a 64 2c 09 20 20 20 20 20  <td>1B@Jd,.     
12e0: 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 43 6f 70      </td><td>Cop
12f0: 79 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 20 37  y    </td><td> 7
1300: 35 20 40 20 31 32 35 36 09 20 20 20 20 20 3c 2f  5 @ 1256.     </
1310: 74 64 3e 3c 2f 74 72 3e 0a 3c 74 72 3e 3c 74 64  td></tr>.<tr><td
1320: 3e 26 6e 62 73 70 3b 3c 2f 74 64 3e 20 3c 74 64  >&nbsp;</td> <td
1330: 3e 36 3a 73 63 65 6e 64 61 20 20 20 20 20 20 20  >6:scenda       
1340: 20 20 3c 2f 74 64 3e 3c 74 64 3e 4c 69 74 65 72    </td><td>Liter
1350: 61 6c 20 3c 2f 74 64 3e 3c 74 64 3e 20 36 20 27  al </td><td> 6 '
1360: 73 63 65 6e 64 61 27 09 20 20 20 20 20 3c 2f 74  scenda'.     </t
1370: 64 3e 3c 2f 74 72 3e 0a 3c 74 72 3e 3c 74 64 3e  d></tr>.<tr><td>
1380: 26 6e 62 73 70 3b 3c 2f 74 64 3e 20 3c 74 64 3e  &nbsp;</td> <td>
1390: 35 78 40 4b 74 2c 09 20 20 20 20 20 20 20 20 20  5x@Kt,.         
13a0: 3c 2f 74 64 3e 3c 74 64 3e 43 6f 70 79 20 20 20  </td><td>Copy   
13b0: 20 3c 2f 74 64 3e 3c 74 64 3e 20 33 38 30 20 40   </td><td> 380 @
13c0: 20 31 33 33 36 09 20 20 20 20 20 3c 2f 74 64 3e   1336.     </td>
13d0: 3c 2f 74 72 3e 0a 3c 74 72 3e 3c 74 64 3e 26 6e  </tr>.<tr><td>&n
13e0: 62 73 70 3b 3c 2f 74 64 3e 20 3c 74 64 3e 36 3a  bsp;</td> <td>6:
13f0: 70 69 65 63 65 73 09 20 3c 2f 74 64 3e 3c 74 64  pieces. </td><td
1400: 3e 4c 69 74 65 72 61 6c 20 3c 2f 74 64 3e 3c 74  >Literal </td><t
1410: 64 3e 20 36 20 27 70 69 65 63 65 73 27 09 20 20  d> 6 'pieces'.  
1420: 20 20 20 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74     </td></tr>.<t
1430: 72 3e 3c 74 64 3e 26 6e 62 73 70 3b 3c 2f 74 64  r><td>&nbsp;</td
1440: 3e 20 3c 74 64 3e 37 39 40 51 74 2c 09 20 20 20  > <td>79@Qt,.   
1450: 20 20 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e 43        </td><td>C
1460: 6f 70 79 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e  opy    </td><td>
1470: 20 34 35 37 20 40 20 31 37 32 30 20 20 20 20 20   457 @ 1720     
1480: 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74 72 3e 3c  </td></tr>.<tr><
1490: 74 64 3e 26 6e 62 73 70 3b 3c 2f 74 64 3e 20 3c  td>&nbsp;</td> <
14a0: 74 64 3e 46 3a 20 45 78 61 6d 70 6c 65 3a 20 65  td>F: Example: e
14b0: 73 6b 69 6c 3c 2f 74 64 3e 3c 74 64 3e 4c 69 74  skil</td><td>Lit
14c0: 65 72 61 6c 20 3c 2f 74 64 3e 3c 74 64 3e 20 31  eral </td><td> 1
14d0: 35 20 27 20 45 78 61 6d 70 6c 65 3a 20 65 73 6b  5 ' Example: esk
14e0: 69 6c 27 3c 2f 74 64 3e 3c 2f 74 72 3e 0a 3c 74  il'</td></tr>.<t
14f0: 72 3e 3c 74 64 3e 26 6e 62 73 70 3b 3c 2f 74 64  r><td>&nbsp;</td
1500: 3e 20 3c 74 64 3e 7e 45 40 59 30 2c 20 20 20 20  > <td>~E@Y0,    
1510: 20 20 20 20 20 20 20 3c 2f 74 64 3e 3c 74 64 3e         </td><td>
1520: 43 6f 70 79 20 20 20 20 3c 2f 74 64 3e 3c 74 64  Copy    </td><td
1530: 3e 20 20 34 30 34 36 20 40 20 32 31 37 36 20 20  >  4046 @ 2176  
1540: 20 20 20 20 20 20 3c 2f 74 64 3e 3c 2f 74 72 3e        </td></tr>
1550: 0a 3c 74 72 3e 3c 74 64 3e 54 72 61 69 6c 65 72  .<tr><td>Trailer
1560: 3c 2f 74 64 3e 3c 74 64 3e 32 7a 4d 4d 33 45 20  </td><td>2zMM3E 
1570: 20 20 20 20 20 20 20 20 20 20 3c 2f 74 64 3e 3c            </td><
1580: 74 64 3e 43 6b 65 63 6b 73 75 6d 3c 2f 74 64 3e  td>Ckecksum</td>
1590: 3c 74 64 3e 20 2d 31 31 30 31 34 33 38 37 37 30  <td> -1101438770
15a0: 20 20 20 20 20 20 20 20 20 3c 2f 74 64 3e 3c 2f           </td></
15b0: 74 72 3e 0a 3c 2f 74 61 62 6c 65 3e 0a 0a 3c 70  tr>.</table>..<p
15c0: 3e 54 68 65 20 75 6e 69 66 69 65 64 20 64 69 66  >The unified dif
15d0: 66 20 62 65 68 69 6e 64 20 74 68 65 20 61 62 6f  f behind the abo
15e0: 76 65 20 64 65 6c 74 61 20 69 73 3c 2f 70 3e 0a  ve delta is</p>.
15f0: 0a 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 31  .<table border=1
1600: 3e 3c 74 72 3e 3c 74 64 3e 3c 70 72 65 3e 0a 62  ><tr><td><pre>.b
1610: 6c 75 65 70 65 61 6b 3a 28 37 36 31 29 20 7e 2f  luepeak:(761) ~/
1620: 50 72 6f 6a 65 63 74 73 2f 54 63 6c 2f 46 6f 73  Projects/Tcl/Fos
1630: 73 69 6c 2f 44 65 76 65 6c 2f 64 65 76 65 6c 20  sil/Devel/devel 
1640: 3e 20 64 69 66 66 20 2d 75 20 2e 2e 2f 44 45 4c  > diff -u ../DEL
1650: 54 41 2f 6f 6c 64 20 2e 2e 2f 44 45 4c 54 41 2f  TA/old ../DELTA/
1660: 6e 65 77 20 0a 2d 2d 2d 20 2e 2e 2f 44 45 4c 54  new .--- ../DELT
1670: 41 2f 6f 6c 64 20 20 20 20 20 20 20 20 32 30 30  A/old        200
1680: 37 2d 30 38 2d 32 33 20 32 31 3a 31 34 3a 34 30  7-08-23 21:14:40
1690: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30  .000000000 -0700
16a0: 0a 2b 2b 2b 20 2e 2e 2f 44 45 4c 54 41 2f 6e 65  .+++ ../DELTA/ne
16b0: 77 20 20 20 20 20 20 20 20 32 30 30 37 2d 30 38  w        2007-08
16c0: 2d 32 33 20 32 31 3a 31 34 3a 33 33 2e 30 30 30  -23 21:14:33.000
16d0: 30 30 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20  000000 -0700.@@ 
16e0: 2d 35 2c 37 20 2b 35 2c 37 20 40 40 0a 20 0a 20  -5,7 +5,7 @@. . 
16f0: 20 2a 20 20 49 66 20 74 68 65 20 73 65 72 76 65   *  If the serve
1700: 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20  r does not have 
1710: 77 72 69 74 65 20 70 65 72 6d 69 73 73 69 6f 6e  write permission
1720: 20 6f 6e 20 74 68 65 20 64 61 74 61 62 61 73 65   on the database
1730: 0a 20 20 20 20 20 66 69 6c 65 2c 20 6f 72 20 6f  .     file, or o
1740: 6e 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20  n the directory 
1750: 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 64  containing the d
1760: 61 74 61 62 61 73 65 20 66 69 6c 65 20 28 61 6e  atabase file (an
1770: 64 20 0a 2d 20 20 20 20 69 74 20 69 73 20 74 68  d .-    it is th
1780: 75 73 20 75 6e 61 62 6c 65 20 74 6f 20 75 70 64  us unable to upd
1790: 61 74 65 20 64 61 74 61 62 61 73 65 20 62 65 63  ate database bec
17a0: 61 75 73 65 20 69 74 20 63 61 6e 6e 6f 74 20 63  ause it cannot c
17b0: 72 65 61 74 65 0a 2b 20 20 20 20 69 74 20 69 73  reate.+    it is
17c0: 20 74 68 75 73 20 75 6e 61 62 6c 65 20 74 6f 20   thus unable to 
17d0: 75 70 64 61 74 65 20 74 68 65 20 64 61 74 61 62  update the datab
17e0: 61 73 65 20 62 65 63 61 75 73 65 20 69 74 20 63  ase because it c
17f0: 61 6e 6e 6f 74 20 63 72 65 61 74 65 0a 20 20 20  annot create.   
1800: 20 20 61 20 72 6f 6c 6c 62 61 63 6b 20 6a 6f 75    a rollback jou
1810: 72 6e 61 6c 29 20 74 68 65 6e 20 69 74 20 63 75  rnal) then it cu
1820: 72 72 65 6e 74 6c 79 20 66 61 69 6c 73 20 73 69  rrently fails si
1830: 6c 65 6e 74 6c 79 20 6f 6e 20 61 20 70 75 73 68  lently on a push
1840: 2e 0a 20 20 20 20 20 49 74 20 6e 65 65 64 73 20  ..     It needs 
1850: 74 6f 20 72 65 74 75 72 6e 20 61 20 68 65 6c 70  to return a help
1860: 66 75 6c 20 65 72 72 6f 72 2e 0a 20 0a 40 40 20  ful error.. .@@ 
1870: 2d 32 37 2c 38 20 2b 32 37 2c 38 20 40 40 0a 20  -27,8 +27,8 @@. 
1880: 20 2a 20 20 41 64 64 69 74 69 6f 6e 61 6c 20 69   *  Additional i
1890: 6e 66 6f 72 6d 61 74 69 6f 6e 20 64 69 73 70 6c  nformation displ
18a0: 61 79 65 64 20 66 6f 72 20 74 68 65 20 22 76 69  ayed for the "vi
18b0: 6e 66 6f 22 20 70 61 67 65 3a 0a 20 0a 20 20 20  nfo" page:. .   
18c0: 20 20 20 2b 20 20 41 6c 6c 20 6c 65 61 76 65 73     +  All leaves
18d0: 20 6f 66 20 74 68 69 73 20 76 65 72 73 69 6f 6e   of this version
18e0: 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 69 6e   that are not in
18f0: 63 6c 75 64 65 64 20 69 6e 20 74 68 65 0a 2d 20  cluded in the.- 
1900: 20 20 20 20 20 20 20 64 65 63 65 6e 64 65 6e 74         decendent
1910: 20 6c 69 73 74 2e 20 20 57 69 74 68 20 64 61 74   list.  With dat
1920: 65 2c 20 75 73 65 72 2c 20 63 6f 6d 6d 65 6e 74  e, user, comment
1930: 2c 20 61 6e 64 20 68 79 70 65 72 6c 69 6e 6b 2e  , and hyperlink.
1940: 0a 2d 20 20 20 20 20 20 20 20 4c 65 61 76 65 73  .-        Leaves
1950: 20 69 6e 20 74 68 65 20 64 65 63 65 6e 64 65 6e   in the decenden
1960: 74 20 74 61 62 6c 65 20 73 68 6f 75 6c 64 20 62  t table should b
1970: 65 20 6d 61 72 6b 65 64 20 61 73 20 73 75 63 68  e marked as such
1980: 2e 0a 2b 20 20 20 20 20 20 20 20 64 65 73 63 65  ..+        desce
1990: 6e 64 61 6e 74 20 6c 69 73 74 2e 20 20 57 69 74  ndant list.  Wit
19a0: 68 20 64 61 74 65 2c 20 75 73 65 72 2c 20 63 6f  h date, user, co
19b0: 6d 6d 65 6e 74 2c 20 61 6e 64 20 68 79 70 65 72  mment, and hyper
19c0: 6c 69 6e 6b 2e 0a 2b 20 20 20 20 20 20 20 20 4c  link..+        L
19d0: 65 61 76 65 73 20 69 6e 20 74 68 65 20 64 65 73  eaves in the des
19e0: 63 65 6e 64 61 6e 74 20 74 61 62 6c 65 20 73 68  cendant table sh
19f0: 6f 75 6c 64 20 62 65 20 6d 61 72 6b 65 64 20 61  ould be marked a
1a00: 73 20 73 75 63 68 2e 0a 20 20 20 20 20 20 20 20  s such..        
1a10: 20 53 65 65 20 74 68 65 20 63 6f 6d 70 75 74 65   See the compute
1a20: 5f 6c 65 61 76 65 73 28 29 20 66 75 6e 63 74 69  _leaves() functi
1a30: 6f 6e 20 74 6f 20 73 65 65 20 68 6f 77 20 74 6f  on to see how to
1a40: 20 66 69 6e 64 20 61 6c 6c 0a 20 20 20 20 20 20   find all.      
1a50: 20 20 20 6c 65 61 76 65 73 2e 0a 20 20 20 20 20     leaves..     
1a60: 20 2b 20 20 41 64 64 20 66 69 6c 65 20 64 69 66   +  Add file dif
1a70: 66 20 6c 69 6e 6b 73 20 74 6f 20 74 68 65 20 66  f links to the f
1a80: 69 6c 65 20 63 68 61 6e 67 65 20 6c 69 73 74 2e  ile change list.
1a90: 0a 40 40 20 2d 33 37 2c 37 20 2b 33 37 2c 37 20  .@@ -37,7 +37,7 
1aa0: 40 40 0a 20 0a 20 20 2a 20 20 54 68 65 20 2f 78  @@. .  *  The /x
1ab0: 66 65 72 20 68 61 6e 64 6c 65 72 20 28 66 6f 72  fer handler (for
1ac0: 20 70 75 73 68 2c 20 70 75 6c 6c 2c 20 61 6e 64   push, pull, and
1ad0: 20 63 6c 6f 6e 65 29 20 64 6f 65 73 20 6e 6f 74   clone) does not
1ae0: 20 64 6f 0a 20 20 20 20 20 64 65 6c 74 61 20 63   do.     delta c
1af0: 6f 6d 70 72 65 73 73 69 6f 6e 2e 20 20 54 68 69  ompression.  Thi
1b00: 73 20 72 65 73 75 6c 74 73 20 69 6e 20 65 78 63  s results in exc
1b10: 65 73 73 20 62 61 6e 64 77 69 64 74 68 20 75 73  ess bandwidth us
1b20: 61 67 65 2e 0a 2d 20 20 20 20 54 68 65 72 65 20  age..-    There 
1b30: 61 72 65 20 73 6f 6d 65 20 63 6f 64 65 20 69 6e  are some code in
1b40: 20 78 66 65 72 2e 63 20 74 68 61 74 20 61 72 65   xfer.c that are
1b50: 20 73 6b 65 74 63 68 65 73 20 6f 66 20 69 64 65   sketches of ide
1b60: 61 73 20 6f 6e 0a 2b 20 20 20 20 54 68 65 72 65  as on.+    There
1b70: 20 61 72 65 20 73 6f 6d 65 20 70 69 65 63 65 73   are some pieces
1b80: 20 69 6e 20 78 66 65 72 2e 63 20 74 68 61 74 20   in xfer.c that 
1b90: 61 72 65 20 73 6b 65 74 63 68 65 73 20 6f 66 20  are sketches of 
1ba0: 69 64 65 61 73 20 6f 6e 0a 20 20 20 20 20 68 6f  ideas on.     ho
1bb0: 77 20 74 6f 20 64 6f 20 64 65 6c 74 61 20 63 6f  w to do delta co
1bc0: 6d 70 72 65 73 73 69 6f 6e 2c 20 62 75 74 20 6e  mpression, but n
1bd0: 6f 74 68 69 6e 67 20 68 61 73 20 62 65 65 6e 20  othing has been 
1be0: 69 6d 70 6c 65 6d 65 6e 74 65 64 2e 0a 20 0a 20  implemented.. . 
1bf0: 20 2a 20 20 45 6e 68 61 6e 63 65 6d 65 6e 74 73   *  Enhancements
1c00: 20 74 6f 20 74 68 65 20 64 69 66 66 20 61 6e 64   to the diff and
1c10: 20 74 6b 64 69 66 66 20 63 6f 6d 6d 61 6e 64 73   tkdiff commands
1c20: 20 69 6e 20 74 68 65 20 63 6c 69 2e 0a 40 40 20   in the cli..@@ 
1c30: 2d 34 35 2c 37 20 2b 34 35 2c 37 20 40 40 0a 20  -45,7 +45,7 @@. 
1c40: 20 20 20 20 73 69 6e 67 6c 65 20 66 69 6c 65 2e      single file.
1c50: 20 20 41 6c 6c 6f 77 20 64 69 66 66 73 20 61 67    Allow diffs ag
1c60: 61 69 6e 73 74 20 61 6e 79 20 74 77 6f 20 61 72  ainst any two ar
1c70: 62 69 74 72 61 72 79 20 76 65 72 73 69 6f 6e 73  bitrary versions
1c80: 2c 0a 20 20 20 20 20 6e 6f 74 20 6a 75 73 74 20  ,.     not just 
1c90: 64 69 66 66 73 20 61 67 61 69 6e 73 74 20 74 68  diffs against th
1ca0: 65 20 63 75 72 72 65 6e 74 20 63 68 65 63 6b 2d  e current check-
1cb0: 6f 75 74 2e 20 20 41 6c 6c 6f 77 20 0a 20 20 20  out.  Allow .   
1cc0: 20 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20    configuration 
1cd0: 6f 70 74 69 6f 6e 73 20 74 6f 20 72 65 70 6c 61  options to repla
1ce0: 63 65 20 74 6b 64 69 66 66 20 77 69 74 68 20 73  ce tkdiff with s
1cf0: 6f 6d 65 20 6f 74 68 65 72 0a 2d 20 20 20 20 76  ome other.-    v
1d00: 69 73 75 61 6c 20 64 69 66 66 65 72 20 6f 66 20  isual differ of 
1d10: 74 68 65 20 75 73 65 72 73 20 63 68 6f 69 63 65  the users choice
1d20: 2e 0a 2b 20 20 20 20 76 69 73 75 61 6c 20 64 69  ..+    visual di
1d30: 66 66 65 72 20 6f 66 20 74 68 65 20 75 73 65 72  ffer of the user
1d40: 73 20 63 68 6f 69 63 65 2e 20 45 78 61 6d 70 6c  s choice. Exampl
1d50: 65 3a 20 65 73 6b 69 6c 2e 0a 20 0a 20 20 2a 20  e: eskil.. .  * 
1d60: 20 54 69 63 6b 65 74 69 6e 67 20 69 6e 74 65 72   Ticketing inter
1d70: 66 61 63 65 20 28 65 78 70 61 6e 64 20 74 68 69  face (expand thi
1d80: 73 20 62 75 6c 6c 65 74 29 0a 0a 3c 2f 70 72 65  s bullet)..</pre
1d90: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62  ></td></tr></tab
1da0: 6c 65 3e 0a 0a 0a 0a 3c 68 32 3e 4e 6f 74 65 73  le>....<h2>Notes
1db0: 3c 2f 68 32 3e 0a 0a 3c 75 6c 3e 0a 3c 6c 69 3e  </h2>..<ul>.<li>
1dc0: 50 75 72 65 20 74 65 78 74 20 66 69 6c 65 73 20  Pure text files 
1dd0: 67 65 6e 65 72 61 74 65 20 61 20 70 75 72 65 20  generate a pure 
1de0: 74 65 78 74 20 64 65 6c 74 61 2e 0a 3c 2f 6c 69  text delta..</li
1df0: 3e 0a 3c 6c 69 3e 42 69 6e 61 72 79 20 66 69 6c  >.<li>Binary fil
1e00: 65 73 20 67 65 6e 65 72 61 74 65 20 61 20 64 65  es generate a de
1e10: 6c 74 61 20 74 68 61 74 20 6d 61 79 20 63 6f 6e  lta that may con
1e20: 74 61 69 6e 20 73 6f 6d 65 20 62 69 6e 61 72 79  tain some binary
1e30: 20 64 61 74 61 2e 0a 3c 2f 6c 69 3e 0a 3c 6c 69   data..</li>.<li
1e40: 3e 49 6e 73 74 65 61 64 20 6f 66 20 70 75 74 74  >Instead of putt
1e50: 69 6e 67 20 73 70 65 63 69 61 6c 20 69 6e 73 74  ing special inst
1e60: 72 75 63 74 69 6f 6e 73 20 66 6f 72 20 67 65 6e  ructions for gen
1e70: 65 72 61 6c 20 63 6f 6d 70 72 65 73 73 69 6f 6e  eral compression
1e80: 0a 69 6e 74 6f 20 74 68 65 20 64 65 6c 74 61 2d  .into the delta-
1e90: 66 6f 72 6d 61 74 20 69 74 73 65 6c 66 2c 20 73  format itself, s
1ea0: 70 65 63 69 66 69 63 61 6c 6c 79 20 74 68 65 20  pecifically the 
1eb0: 73 65 67 6d 65 6e 74 2d 6c 69 73 74 2c 20 6c 69  segment-list, li
1ec0: 6b 65 0a 72 75 6e 2d 6c 65 6e 67 74 68 20 65 6e  ke.run-length en
1ed0: 63 6f 64 69 6e 67 20 6f 66 20 6c 69 74 65 72 61  coding of litera
1ee0: 6c 73 2c 20 65 74 63 2e 20 69 74 20 77 61 73 20  ls, etc. it was 
1ef0: 63 6f 6e 73 69 64 65 72 65 64 20 74 6f 20 62 65  considered to be
1f00: 20 6d 75 63 68 0a 6d 6f 72 65 20 73 65 6e 73 69   much.more sensi
1f10: 62 6c 65 20 74 6f 20 6b 65 65 70 20 74 68 65 20  ble to keep the 
1f20: 76 61 72 69 6f 75 73 20 63 6f 6e 63 65 72 6e 20  various concern 
1f30: 73 65 70 61 72 61 74 65 20 61 6e 64 20 75 73 65  separate and use
1f40: 20 61 20 67 65 6e 65 72 61 6c 0a 63 6f 6d 70 72   a general.compr
1f50: 65 73 73 69 6f 6e 20 6c 69 62 72 61 72 79 2c 20  ession library, 
1f60: 6c 69 6b 65 20 3c 61 20 68 72 65 66 3d 22 68 74  like <a href="ht
1f70: 74 70 3a 2f 2f 77 77 77 2e 7a 6c 69 62 2e 6e 65  tp://www.zlib.ne
1f80: 74 22 3e 7a 6c 69 62 3c 2f 61 3e 2c 20 74 6f 0a  t">zlib</a>, to.
1f90: 63 6f 6d 70 72 65 73 73 20 74 68 65 20 66 75 6c  compress the ful
1fa0: 6c 20 64 65 6c 74 61 20 61 66 74 65 72 20 69 74  l delta after it
1fb0: 73 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0a 3c 2f  s generation..</
1fc0: 6c 69 3e 0a 3c 2f 75 6c 3e 0a 0a 3c 2f 62 6f 64  li>.</ul>..</bod
1fd0: 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a                 y>.</html>.