Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Could you possibly show an example? Commented Feb 4, 2020 at 6:32
  • Thank you for your answer. bsdiff uses memory equal to 17 times the size of oldfile so this won't usually work for 4GB files (at least on my 8GB RAM machine). Commented Feb 4, 2020 at 8:20
  • @Basj What is possible is to chop up the 4GB file into smaller ones (say 128MB each), and do individual deltas. This could be wrapped into a script. chopped-bsdiff: chop the files, do pairwise bsdiffs, tar those up into an archive. chopped-bspatch: read pairwise patches from archive, apply to chunks of input file, catenate output. Commented Feb 4, 2020 at 16:28
  • @Kaz I see, but I'm more looking for a ready-to-use tool that can be called in 1 line (mydiff abc abc2 > patchfile and mypatch abc patchfile > abc3) regardless the size. Also, if I chop into 128 MB chunks, what happens if the first 1GB of abc == the last (trailing) 1GB of abc2? When we'll compare abc-first128mb with abc2-first128mb, no match will be found, so it might not be efficient? Commented Feb 4, 2020 at 17:41