git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2008, 06:16 UTC
Message-ID
<7vve2vse2k.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080406045132.GA10274@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 10 quoted lines
> Peter Eriksen <s022018@student.dtu.dk> wrote:
> ...
>> +     (for object type ofs_delta)
>> +     n-byte offset (n*7-bit as above, but with size0 being 7 bit)     
>> +     compressed delta data
>> +
>
> 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).

Right. Saying just "n-byte offset" can be mistaken as the offset from the beginning of the file, and making it clear that it is relative is good.

> 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).
Ah, I forgot about that one.
Previous: Shawn O. Pearce
Message 4 of 4 in “Update, and clear up the pack format documentation a bit”
  1. Update, and clear up the pack format documentation a bitPeter Eriksen, Apr 5, 2008
  2. Junio C HamanoApr 5, 2008
  3. Shawn O. PearceApr 6, 2008
  4. Junio C HamanoApr 6, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.