behavior of rolling_hash2_run is ill defined
- Dominant language
- C
- Stars
- 301
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
Hi, all.
Could you help me clarify a few details regarding the use of `rolling_hash2_run` function?
- What is the value of the offset if the function returns `FINGERPRINT_RET_MAX`? The documentation says it is set only in case of a `HIT`, but the example chunking code ignores the result of the function, so I need to assume that offset is the same as if a chunk boundary had been found at the last byte of the buffer, that is, it points to the last byte of the buffer + 1. Is this correct?
- What does it mean for `rolling_hash2_run` to return `FINGERPRINT_RET_OTHER`? Why does the example does not consider this return?
- Do I need to call `rolling_hash2_reset` before every `rolling_hash2_run` call? Or can I use the following flow?
```
reset()
1: result = run()
if (result == FINGERPRINT_RET_HIT)
process_chunk
else if (result == FINGERPRINT_RET_MAX)
replace buffer
goto 1
```
Regards
Contributor guide
Assessment
This issue has not been assessed yet.