DELETED www/delta1.gif Index: www/delta1.gif ================================================================== --- www/delta1.gif +++ /dev/null cannot compute difference between binary files DELETED www/delta2.gif Index: www/delta2.gif ================================================================== --- www/delta2.gif +++ /dev/null cannot compute difference between binary files DELETED www/delta3.gif Index: www/delta3.gif ================================================================== --- www/delta3.gif +++ /dev/null cannot compute difference between binary files DELETED www/delta4.gif Index: www/delta4.gif ================================================================== --- www/delta4.gif +++ /dev/null cannot compute difference between binary files DELETED www/delta5.gif Index: www/delta5.gif ================================================================== --- www/delta5.gif +++ /dev/null cannot compute difference between binary files DELETED www/delta6.gif Index: www/delta6.gif ================================================================== --- www/delta6.gif +++ /dev/null cannot compute difference between binary files Index: www/delta_format.wiki ================================================================== --- www/delta_format.wiki +++ www/delta_format.wiki @@ -61,21 +61,30 @@ that returns one row for the header, for the trailer, and for each segment in delta D.
+A delta consists of three parts, a "header", a "trailer", and a "segment-list" between them.
Both header and trailer provide information about the target helping the decoder, and the segment-list describes how the target can be constructed from the original.
+The header consists of a single number followed by a newline character (ASCII 0x0a). The number is the length of the target in bytes.
@@ -83,11 +92,15 @@ the target (and allocate any necessary memory based on that) by simply reading the first line of the delta and decoding the number found there. In other words, before it has to decode everything else.
+The trailer consists of a single number followed by a semicolon (ASCII 0x3b). This number is a checksum of the target and can be used by a decoder to verify that the delta applied correctly, reconstructing the target from the original.
@@ -100,11 +113,32 @@By putting this information at the end of the delta a decoder has it available immediately after the target has been reconstructed fully.
+The segment-list of a delta describes how to create the target from the original by a combination of inserting literal byte-sequences and copying ranges of bytes from the original. This is where the compression takes place, by encoding the large common parts of @@ -117,11 +151,17 @@
A literal is specified by two elements, the size of the literal in bytes, and the bytes of the literal itself.
-
+The length is written first, followed by a colon character (ASCII 0x3a), followed by the bytes of the literal.
A range to copy is specified by two numbers, the offset of the first byte in the original to copy, and the size of the range, in bytes. The size zero is special, its usage indicates that the range extends to the end of the original.
-
+The length is written first, followed by an "at" character (ASCII 0x40), then the offset, followed by a comma (ASCII 0x2c).
This can be taken apart into the following parts:
| What | Encoding | Meaning | Details |
|---|---|---|---|
| Header | 1Xb | Size | 6246 |
| S-List | 4E@0, | Copy | 270 @ 0 |
| 2:th | Literal | 2 'th' | |
| FN@4C, | Copy | 983 @ 268 | |
| 6:scenda | Literal | 6 'scenda' | |
| 1B@Jd, | Copy | 75 @ 1256 | |
| 6:scenda | Literal | 6 'scenda' | |
| 5x@Kt, | Copy | 380 @ 1336 | |
| 6:pieces | Literal | 6 'pieces' | |
| 79@Qt, | Copy | 457 @ 1720 | |
| Header | 1Xb | Size | 6246 |
| S-List | 4E@0, | Copy | 270 @ 0 |
| 2:th | Literal | 2 'th' | |
| FN@4C, | Copy | 983 @ 268 | |
| 6:scenda | Literal | 6 'scenda' | |
| 1B@Jd, | Copy | 75 @ 1256 | |
| 6:scenda | Literal | 6 'scenda' | |
| 5x@Kt, | Copy | 380 @ 1336 | |
| 6:pieces | Literal | 6 'pieces' | |
| 79@Qt, | Copy | 457 @ 1720 | |
| F: Example: eskil | Literal | 15 ' Example: eskil' | |
| ~E@Y0, | Copy | 4046 @ 2176 | |
| Trailer | 2zMM3E | Checksum | -1101438770 |