Re: [PATCH] Update, and clear up the pack format documentation a bit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn O. Pearce
Date: Saturday, April 5, 2008 - 9:51 pm

Peter Eriksen <s022018@student.dtu.dk> wrote:
...

That is not correct.  The ofs_delta is encoded as an n-byte offset
that is subtracted from the current object's first byte (the byte
holding the type/representation field and first 4 bits of length).

The n-byte encoding for an ofs_delta is different then the one
used for the length.  We add 1 for each byte where the MSB is 1.
We also store the data in big-endian form (the most significant
byte is first and the least significant byte is last).

See get_delta_base in sha1_file.c for the details of this.

In pack v4 I planned on using this particular encoding in more
of the format than just here.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Update, and clear up the pack format documenta ..., Shawn O. Pearce, (Sat Apr 5, 9:51 pm)