bsdiff icon indicating copy to clipboard operation
bsdiff copied to clipboard

Can the file write in bspatch be changed to stream?

Open razeh opened this issue 6 years ago • 1 comments

Could bspatch write out a flush as it goes to avoid needing to allocate the entire file? It isn't clear to me if newpos is strictly increasing or not -- are ctrl[1] and ctrl[0] always positive?

razeh avatar Apr 04 '19 19:04 razeh

I may answer too late but anyway: ctrl[0] & ctrl[1] are always positive.

Incidentally I thought about exactly this yesterday but I think it adds unnecessary complexity. Even if you stream target writes, you may still end up with max(ctrl[0], ctrl[1]) buffer size which may very well be the same as target size.

Unless you are hitting INT_MAX limitation on x86, I'd suggest to use target memory mapping instead. I didn't measure performance though.

Let me know of your thoughts.

drake127 avatar Sep 21 '20 09:09 drake127