pleonex / xdelta-sharp

Decompressor for delta encoding VCDIFF (RFC-3284) -- xdelta3 compatible.
https://www.pleonex.dev/xdelta-sharp/
MIT License
33 stars 7 forks source link

unavailable secondary compressor #12

Open Rast1234 opened 2 years ago

Rast1234 commented 2 years ago

Recent versions of xdelta3 apply some sort of secondary compression by default. xdelta-sharp clearly does not support this (throws exception about secondary compressor). I've spent couple hours fighting this issue, so i'm sharing my workaround for anyone who might be struggling with it.

Issue can be avoided by using -S argument of xdelta3 to disable secondary compression:

xdelta3 -e -S -s original_file modified_file output_patch

Might be worth mentioning in docs or in exception message itself?

brilam commented 2 years ago

Hi @Rast1234. Thanks for sharing this. Which version of xdelta are you using? When I generate the deltas without secondary compression and use xdelta-sharp to apply them, I get "not a VCDIFF input". I suspect xdelta may not be backward/foward compatible.

Rast1234 commented 2 years ago

I was using xdelta3-3.1.0-x86_64.exe from here: https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0

brilam commented 2 years ago

That is strange. I have the same version as well. Hmmm

Rast1234 commented 2 years ago

or maybe i spotted this because i used another version at the time, there are different xdelta3 repositories on GH :( have to try and reproduce and remember what binary is used

brilam commented 2 years ago

Sorry about that. False alarm. I had a binary with the exact same name as what you mentioned but I guess it may have been compiled from another source. I just got the one directly from the link that you provided and it works as expected. I am wondering now if it'd be a straightforward process to add secondary decompression to xdelta-sharp. I see that the default compression from xdelta is LZMA.

Rast1234 commented 2 years ago

probably your version is https://github.com/jmacd/xdelta which has same tag but doesnt provide binary. i didn't try it and i think it might have some differences because 3.10 is not labeled as "beta"