Skip to content

Commit

Permalink
Add description of OFS_DELTA to the pack format description
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Eriksen authored and Junio C Hamano committed Apr 7, 2008
1 parent ba1333f commit 9de328f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Documentation/technical/pack-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,24 @@ Pack file entry: <+
packed object data:
If it is not DELTA, then deflated bytes (the size above
is the size before compression).
If it is DELTA, then
If it is REF_DELTA, then
20-byte base object name SHA1 (the size above is the
size of the delta data that follows).
delta data, deflated.
If it is OFS_DELTA, then
n-byte offset (see below) interpreted as a negative
offset from the type-byte of the header of the
ofs-delta entry (the size above is the size of
the delta data that follows).
delta data, deflated.

offset encoding:
n bytes with MSB set in all but the last one.
The offset is then the number constructed by
concatenating the lower 7 bit of each byte, and
for n >= 2 adding 2^7 + 2^14 + ... + 2^(7*(n-1))
to the result.



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

0 comments on commit 9de328f

Please sign in to comment.