[PATCH v2] Add description of OFS_DELTA to the pack format description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Eriksen <s022018@xxxxxxxxxxxxxx>
---
 Documentation/technical/pack-format.txt |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)


On Sun, Apr 06, 2008 at 03:07:24PM -0400, Shawn O. Pearce wrote:
...
> You are missing the description that the position within _this_
> packfile is determined by:
> 
> 	offset_of_type_byte - n_byte_offset
> 
> The above can still be taken to mean the offset is from the start
> of the packfile or something like that.

Yes, I misunderstood that.

Peter

diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index aa87756..953c7ee 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -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) counted 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
-- 
1.5.5-rc3.GIT
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux