sisong / HDiffPatch

a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; runs fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Other
1.52k stars 280 forks source link

Question on applying a patch onto the same partition #361

Closed Kevin-gluck closed 11 months ago

Kevin-gluck commented 11 months ago

Hi,

I'm trying to use this library to patch one of my embedded device's file which is usually bigger than 1GB with small memory(RAM) footprint, eg ~1GB. I'd like to know if following is possible;

  1. make patch file delta.hdiff for src.img -> target.img on the host machine
  2. download delta.hdiff to embedded device
  3. apply patch delta.hdiff to src.img directly (meaning, I cannot make new target.img in the device because of storage limitation)

Also, I'd like to know how much RAM are required during patching. To be more specific, what is the value of "decompress buffer size"

Thanks in advance.

sisong commented 11 months ago

I cannot make new target.img in the device because of storage limitation

now, hdiffpatch not support inplace-patch.

"decompress buffer size"

this size is dictSize when diff compressor sets.

Kevin-gluck commented 11 months ago

Thanks for update. One more question, can I know if this library is being used on any well known product or device, eg AOSP ?

sisong commented 11 months ago

hdiffpatch is heavily used: at least than 10 apps with more than 100 million users, used hdiffpatch.

Kevin-gluck commented 11 months ago

Thanks for comments.