{"thread":{"id":"48097","subject":"Understanding Binary Deltas within Packfile","startedAt":"2018-03-20T15:53:45Z","lastAt":"2018-03-20T19:12:41Z","messageCount":4,"participants":["Luke Robison","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"342326","messageId":"f301d093-af93-016b-79b9-3102475260cf@arlut.utexas.edu","threadId":"48097","inReplyTo":null,"subject":"Understanding Binary Deltas within Packfile","fromName":"Luke Robison","fromEmail":"robison@arlut.utexas.edu","sentAt":"2018-03-20T15:43:50Z","receivedAt":"2018-03-20T15:53:45Z","isPatch":false,"sender":{"key":"robison@arlut.utexas.edu","avatar":null},"body":"Is there any documentation of the contents of the binary delta datain a \npackfile, and how to interpret them?  I found \nhttps://github.com/git/git/blob/master/Documentation/technical/pack-format.txt \ndocumenting the packfile itself, but the \"compressed delta data\" seems \nlargely undocumented.  The source code of \nhttps://github.com/git/git/blob/master/diff-delta.c is pretty dense.  \nThis is what I've got so for:\n\n+-------------+\n| Varint src_size\n| Varint trg_size\n| 1-byte inscnt\n| N-bytes up to 16 bytes of trg_buf\n|\n| A series of Operations\n|\n+-------------\n\n\nAny details on how to interpret the opcodes would be greatly appreciated.\n\nThanks,\nLuke\n\n"},{"id":"342329","messageId":"CACsJy8ABgZy=eJ7niUysb2XZ3qUr3J+jmh_5YWZ1ZDiFCrb0tA@mail.gmail.com","threadId":"48097","inReplyTo":"f301d093-af93-016b-79b9-3102475260cf@arlut.utexas.edu","subject":"Re: Understanding Binary Deltas within Packfile","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-03-20T16:03:50Z","receivedAt":"2018-03-20T16:04:37Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Mar 20, 2018 at 4:43 PM, Luke Robison <robison@arlut.utexas.edu> wrote:\n> Is there any documentation of the contents of the binary delta datain a\n> packfile, and how to interpret them?  I found\n> https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt\n> documenting the packfile itself, but the \"compressed delta data\" seems\n> largely undocumented.  The source code of\n> https://github.com/git/git/blob/master/diff-delta.c is pretty dense.\n\nThe output is consumed by patch_delta()  in patch-delta.c if I'm not\nmistaken. This function is less than 100 lines, probably much easier\nto see the delta format.\n\n>  This\n> is what I've got so for:\n>\n> +-------------+\n> | Varint src_size\n> | Varint trg_size\n> | 1-byte inscnt\n> | N-bytes up to 16 bytes of trg_buf\n> |\n> | A series of Operations\n> |\n> +-------------\n>\n>\n> Any details on how to interpret the opcodes would be greatly appreciated.\n>\n> Thanks,\n> Luke\n>\n\n\n\n-- \nDuy\n"},{"id":"342350","messageId":"751c0493-435c-4a98-4d1c-e3d6677c62d8@arlut.utexas.edu","threadId":"48097","inReplyTo":"CACsJy8ABgZy=eJ7niUysb2XZ3qUr3J+jmh_5YWZ1ZDiFCrb0tA@mail.gmail.com","subject":"Re: Understanding Binary Deltas within Packfile","fromName":"Luke Robison","fromEmail":"robison@arlut.utexas.edu","sentAt":"2018-03-20T18:34:48Z","receivedAt":"2018-03-20T18:34:54Z","isPatch":false,"sender":{"key":"robison@arlut.utexas.edu","avatar":null},"body":"On 3/20/2018 11:03 AM, Duy Nguyen wrote:\n> On Tue, Mar 20, 2018 at 4:43 PM, Luke Robison <robison@arlut.utexas.edu> wrote:\n>> Is there any documentation of the contents of the binary delta datain a\n>> packfile, and how to interpret them?  I found\n>> https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt\n>> documenting the packfile itself, but the \"compressed delta data\" seems\n>> largely undocumented.  The source code of\n>> https://github.com/git/git/blob/master/diff-delta.c is pretty dense.\n> The output is consumed by patch_delta()  in patch-delta.c if I'm not\n> mistaken. This function is less than 100 lines, probably much easier\n> to see the delta format.\nThank you, that was much easier to read, and I've got my prototype \nworking now.  I also found this site to be quite helpful:\nhttp://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/#delta_encoding\n\n\n\n"},{"id":"342355","messageId":"CACsJy8ChV5sXV7N0+N0y9ehO56UCJ8fuqjFbHbbnez35P5af4g@mail.gmail.com","threadId":"48097","inReplyTo":"751c0493-435c-4a98-4d1c-e3d6677c62d8@arlut.utexas.edu","subject":"Re: Understanding Binary Deltas within Packfile","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-03-20T19:12:05Z","receivedAt":"2018-03-20T19:12:41Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Mar 20, 2018 at 7:34 PM, Luke Robison <robison@arlut.utexas.edu> wrote:\n> On 3/20/2018 11:03 AM, Duy Nguyen wrote:\n>>\n>> On Tue, Mar 20, 2018 at 4:43 PM, Luke Robison <robison@arlut.utexas.edu>\n>> wrote:\n>>>\n>>> Is there any documentation of the contents of the binary delta datain a\n>>> packfile, and how to interpret them?  I found\n>>>\n>>> https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt\n>>> documenting the packfile itself, but the \"compressed delta data\" seems\n>>> largely undocumented.  The source code of\n>>> https://github.com/git/git/blob/master/diff-delta.c is pretty dense.\n>>\n>> The output is consumed by patch_delta()  in patch-delta.c if I'm not\n>> mistaken. This function is less than 100 lines, probably much easier\n>> to see the delta format.\n>\n> Thank you, that was much easier to read, and I've got my prototype working\n> now.  I also found this site to be quite helpful:\n> http://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/#delta_encoding\n\nBy the way, I forgot to add, if you want to improve pack-format.txt\n(since you study it anyway), patches are always welcome.\n-- \nDuy\n"}]}