Add description of OFS_DELTA to the pack format description
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Peter Eriksen committed
Apr 6, 2008 at 22:51 UTC
9de328fea951eca9524feaa5eb55762467df6b98
1 file changed
+15
-1
Documentation/technical/pack-format.txt
+15
-1
@@ -103,10 +103,24 @@ Pack file entry: <+
103
packed object data:
104
If it is not DELTA, then deflated bytes (the size above
105
is the size before compression).
106
- If it is DELTA, then
106
+ If it is REF_DELTA, then
107
20-byte base object name SHA1 (the size above is the
108
size of the delta data that follows).
109
delta data, deflated.
110
+ If it is OFS_DELTA, then
111
+ n-byte offset (see below) interpreted as a negative
112
+ offset from the type-byte of the header of the
113
+ ofs-delta entry (the size above is the size of
114
+ the delta data that follows).
115
+ delta data, deflated.
116
+
117
+ offset encoding:
118
+ n bytes with MSB set in all but the last one.
119
+ The offset is then the number constructed by
120
+ concatenating the lower 7 bit of each byte, and
121
+ for n >= 2 adding 2^7 + 2^14 + ... + 2^(7*(n-1))
122
+ to the result.
123
+
124
125
126
= Version 2 pack-*.idx files support packs larger than 4 GiB, and