jue89 / tiny-vcdiff

Decoder for open-vcdiff interleaved deltas
MIT License
6 stars 0 forks source link

Compatibility with xdelta3 ? #5

Open joelguittet opened 4 months ago

joelguittet commented 4 months ago

hello,

First congrats on this library, I evaluated it and looks very interesting :eyes:

You mentioned the compatibility with open-vcdiff that is RFC3284 compliant and I verified you library is able to decode some files created with open-vcdiff so it's really good!

Have you checked xdelta3 ? I have seen several times it's compatible with RFC3284 too (on the source github https://github.com/jmacd/xdelta and for example on https://en.wikipedia.org/wiki/Xdelta), and I tried to check it but didn't succeeded. I suppose maybe some options of xdelta3 must be set and maybe you already explored this question :-) ?

I would like to use your library to decode a file created with xdelta3.

Thanks for sharing your experience here!

Regards Joel

jue89 commented 2 months ago

Sry for the late response.

Yes, I've used xdelta3 before. The problem is that pure RFC3284 requires us to read a full window before it can be applied. This is due to the fact that instructions and data are located in different buckets and, thus, in different memory regions. This means, we need to store around 1MB of data in RAM - this is not feasible for microcontrollers which is the main reason I started writing this lib.

Google's openvcdiff violates the RFC when then -interleave flag is set. In that case, instructions and data are interleaved in the same bucket which enables this lib to apply deltas with minimal memory footprint.