Skip to content

Commit 9de328f

Browse files
Peter Eriksengitster
authored andcommitted
Add description of OFS_DELTA to the pack format description
Signed-off-by: Peter Eriksen <[email protected]> Acked-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba1333f commit 9de328f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Documentation/technical/pack-format.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,24 @@ Pack file entry: <+
103103
packed object data:
104104
If it is not DELTA, then deflated bytes (the size above
105105
is the size before compression).
106-
If it is DELTA, then
106+
If it is REF_DELTA, then
107107
20-byte base object name SHA1 (the size above is the
108108
size of the delta data that follows).
109109
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+
110124

111125

112126
= Version 2 pack-*.idx files support packs larger than 4 GiB, and

0 commit comments

Comments
 (0)