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

Re: Understanding Binary Deltas within Packfile

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 20, 2018, 16:03 UTC
Message-ID
<CACsJy8ABgZy=eJ7niUysb2XZ3qUr3J+jmh_5YWZ1ZDiFCrb0tA@mail.gmail.com>
In-Reply-To
<f301d093-af93-016b-79b9-3102475260cf@arlut.utexas.edu>
On Tue, Mar 20, 2018 at 4:43 PM, Luke Robison <robison@arlut.utexas.edu> wrote:
Show 6 quoted lines
> Is there any documentation of the contents of the binary delta datain a
> packfile, and how to interpret them?  I found
> https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt
> documenting the packfile itself, but the "compressed delta data" seems
> largely undocumented.  The source code of
> https://github.com/git/git/blob/master/diff-delta.c is pretty dense.

The output is consumed by patch_delta() in patch-delta.c if I'm not mistaken. This function is less than 100 lines, probably much easier to see the delta format.

Show 19 quoted lines
>  This
> is what I've got so for:
>
> +-------------+
> | Varint src_size
> | Varint trg_size
> | 1-byte inscnt
> | N-bytes up to 16 bytes of trg_buf
> |
> | A series of Operations
> |
> +-------------
>
>
> Any details on how to interpret the opcodes would be greatly appreciated.
>
> Thanks,
> Luke
>
-- 
Duy
Previous: Luke RobisonNext: Luke Robison
Message 2 of 4 in “Understanding Binary Deltas within Packfile”
  1. Luke RobisonMar 20, 2018
  2. Duy NguyenMar 20, 2018
  3. Luke RobisonMar 20, 2018
  4. Duy NguyenMar 20, 2018

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.