green-coder / cdc

A library for performing Content-Defined Chunking (CDC) on data streams.
MIT License
23 stars 5 forks source link

SeparatorIter should probably output final block in stream #6

Closed jhugard closed 2 years ago

jhugard commented 2 years ago

SeparatorIter currently only outputs separators that exactly match the predicate, which means the final block processed will probably not be output.

IMHO, when the source stream ends, SeparatorIter should output the final index value & current hash, even if it does not match the predicate. This could potentially simplify some use cases.

green-coder commented 2 years ago

I am sorry, I don't plan on changing the library with a breaking change in the behavior. A separator will remain a separator and not a block-ending marker.