Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please explain what means partially compatible with the vcdiff #369

Closed
JuniorJPDJ opened this issue Dec 26, 2023 · 3 comments
Closed

Please explain what means partially compatible with the vcdiff #369

JuniorJPDJ opened this issue Dec 26, 2023 · 3 comments

Comments

@JuniorJPDJ
Copy link

Hey,
Can you please tell me more about what's partial in the compatibility between hdiffpatch and vcdiff?
It would be nice if you could also write it in readme for others ;D
Readme states this: partially compatible with the open-vcdiff and xdelta3 patch file format VCDIFF(RFC 3284).

@sisong
Copy link
Owner

sisong commented Dec 26, 2023

run $hdiffz or $hpatchz, can see some info about VCDIFF.

  1. $hdiffz -VCD can created a standard VCDIFF format diffFile, but diffFile used single source window size == oldFile size;
    if this diffFile patch by open-vcdiff or xdelta3, will used larger memory (all oldFile's data will be loaded in memory).
  2. $hpatchz unspport some xdelta's
    diffFile, it's created by $xdelta3 -S djw or $xdelta3 -S fgk

( ref #316 )

@jpruciak
Copy link

so hdiffz creates fully compatible VCDIFF, but hpatchz can only apply patches created by hdiffz?

@sisong
Copy link
Owner

sisong commented Dec 26, 2023

I'm sorry I didn't make the situation clear.

  • $hdiffz -VCD ... created diffFile, uncompressed, compatible with VCDIFF format.
    $hpatchz & $open-vcdiff & $xdelta3 all can apply this diffFile;
    $hpatchz requires O(1) memory when patching;
    but $open-vcdiff & $xdelta3 maybe requires O(oldFileSize+newFileSize) memory when patching. (because the diffFile used the sourceWindowSize == oldFileSize )
  • $hdiffz -VCD-compressLevel[-dictSize] ... created diffFile, compressed by 7zXZ, compatible $xdelta3 -S lzma.
    $hpatchz & $xdelta3 can apply it;
    $hpatchz requires O(3*dictSize) memory when patching;
    but $xdelta3 maybe requires O(oldFileSize+newFileSize+3*dictSize) memory when patching.
  • $hpatchz support all diffFile created by $open-vcdiff (includes various parameter combinations and private formats), requires O(sourceWindowSize+targetWindowSize) memory when patching;
  • $hpatchz support the diffFile created by $xdelta3 -S, requires O(sourceWindowSize+targetWindowSize) memory when patching;
  • $hpatchz support the diffFile created by $xdelta3 -S lzma, requires O(sourceWindowSize+targetWindowSize+3*dictSize) memory when patching;
  • $hpatchz unsupport the diffFile created by $xdelta3 -S djw or $xdelta3 -S fgk. (hpatchz not included djw&fgk's decompressor)

@sisong sisong closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants