-
Notifications
You must be signed in to change notification settings - Fork 131
Description
At the end of decoding in the specified codecs, some checks are performed to verify that the pointer of the input data is less than the estimated data to read:
https://github.com/lemire/FastPFor/blob/224fe919760c073566334dde6f510769aff41beb/headers/simple8b.h#L640
https://github.com/lemire/FastPFor/blob/224fe919760c073566334dde6f510769aff41beb/headers/simple16.h#L748
Although this makes sense in debug mode to check consistency, the nvalue parameter is enough to decode. So, if this check does not perform another task than the mentioned, (1) maybe the len parameter could be removed; or (2) the assertions could be modified to allow len = 0, which is useful when the data len is not known , e.g.:
assert(len == 0 || in64 <= finalin64)