dflemstr / vcdiff-rs

High-level bindings to open-vcdiff, a codec for the VCDIFF binary delta format.
2 stars 2 forks source link

decode() fails on large outputs (and it can't signal that condition) #1

Open willglynn opened 7 years ago

willglynn commented 7 years ago

I'm using this library to apply some diffs which are presented in vcdiff format, and it's generally working, but it fails for larger sizes. It prints something like:

ERROR: Length of target window (123538216) exceeds limit of 67108864 bytes

vcdiff::decode() doesn't return an error; the reason I know it failed is that I was independently checking the output against a known digest.

The size limit appears to be kDefaultMaximumTargetFileSize, which can be raised via SetMaximumTargetFileSize(), but perhaps the streaming decoder interface would be a worthwhile investment for target files in the hundreds of megabytes.

How would you like to proceed?

dflemstr commented 7 years ago

Implementing the full API would definitely be the way to go I think, including the streaming API. It's strange that this didn't raise some kind of exception?