lib/deltify.c

Branch


Log

Author Commit Date CI Message
Omar Polo d6a28ffe 2022-05-20T21:21:42 use random seeds for murmurhash2 change the three hardcoded seeds to fresh ones generated on demand via arc4random. Suggested/fixed by and ok stsp@
Christian Weisgerber d58ddaf3 2022-03-17T20:02:40 const-ify tables ok thomas_adam millert
Christian Weisgerber f6027426 2022-02-12T21:48:46 consistently match size of hash variables to that returned by murmurhash ok millert stsp
Stefan Sperling 2b474c25 2022-02-11T22:45:00 use murmurhash instead of sha1 for deltification blocks; suggested by ori
Stefan Sperling 64a8571e 2022-01-07T23:32:27 map raw object files into memory while packing if possible
Stefan Sperling 2d467c6d 2021-10-13T18:07:29 fix wrong function in error string of emitdelta()
Stefan Sperling f736d93a 2021-10-07T19:12:36 link to the FastCDC paper from deltify.c; suggested by Ori some time ago
Stefan Sperling 6eab69f7 2021-10-07T19:08:52 make the number of elements in deltify's geartab explicit
Stefan Sperling 5de743f8 2021-08-29T13:15:27 fix seek to incorrect offset in the delta base when creating deltas The stretchblk() function needs to compare data located after the block which has just been matched. However, upon entry it was resetting the file pointer of the delta base to the beginning(!) of the block. The other file is correctly positioned after the block. In many cases the data won't match and stretchblk() will not stretch the matched block. But when the data did happen to match this resulted in a bogus delta, and wrong file contents when the delta was applied. Fix this by setting the delta base file pointer to end of the block. Problem reported by naddy after our server refused a pack file which was sent by 'got send'. I could reproduce the issue by running the 'gotadmin pack' command on a copy of naddy's repository. ok naddy
Stefan Sperling 0af64e86 2021-08-22T12:54:21 plug a memory leak in an error path of got_deltify()
Stefan Sperling dd29967c 2021-08-22T12:53:22 make got_deltify() rellocate the deltas array less often
Stefan Sperling 9a8dc2b3 2021-06-18T14:10:55 fix deltas with trailing data that is smaller than the minimum chunk size
Stefan Sperling 740bba1c 2021-06-18T14:07:35 allow the delta base file to lose its header between deltify_init and deltify This simplifies pack file creation. A delta base could be read from a loose object, a packfile, or it might be available in a temporary file. All these cases can now be handled the same way. We may need to open, close, and re-open a given delta base multiple times while packing.
Stefan Sperling 7550e799 2021-06-18T13:59:46 check for errors from emitdelta() in got_deltify()
Stefan Sperling aa51f4a4 2021-06-18T13:57:59 handle fseek in got_deltify() instead of in stretchblk(); simplifies the code
Stefan Sperling f34b169e 2021-06-18T13:28:25 Allow for skipping the base object header in got_deltify().
Stefan Sperling 0d15f6dc 2021-06-13T17:03:59 in addblk(), only read data into buffer1 if we will compare it to buffer2 suggested by and ok naddy@
Stefan Sperling 68bdcdc2 2021-06-11T17:10:50 addblk() may seek in its input file; reposition the file pointer afterwards
Stefan Sperling a893025f 2021-06-11T17:02:57 addblk: iterate over the correct number of entries after growing the array ok naddy
Stefan Sperling e89540a9 2021-06-11T17:02:13 addblk: be more careful about expanding the blocks array when we outgrow it fixes + ok naddy
Stefan Sperling 51a494da 2021-06-11T17:00:02 check a block's hash as well as its length before expensive comparisons suggested by + ok naddy, and Ori agrees
Stefan Sperling dbbf4a5f 2021-05-20T09:51:59 allow got_deltify_free(NULL); will be needed by 'gotadmin pack'
Christian Weisgerber 22403ab7 2021-03-22T16:20:51 deltify.c: explicitly include <endian.h> for be64toh()
Stefan Sperling 69aa0e90 2021-03-10T22:49:21 substantial rewrite of deltify.c; operate on plain files only
Stefan Sperling 5788893e 2021-03-10T22:49:21 fix off-by-one error in delta length; from ori git9 commit fbb2fb7c87d8edf58e22c84f575853dc9de79ac4
Stefan Sperling f364801d 2021-03-10T22:49:21 first pass over deltify.c: adapt coding style and data types; make it compile
Stefan Sperling 2a0e67f7 2021-03-10T22:49:21 Ori has authorized a licence change to OpenBSD's license template
Stefan Sperling 56e7a15f 2021-03-10T22:49:21 add deltify.c, unmodified from git9, with license header added