package xapi-stdext-zerocheck
Module Xapi_stdext_zerocheck.ZerocheckSource
is_all_zeroes x len returns true if the substring is all zeroes
find_a_zero x len offset returns the offset in x of a zero character after offset, or None if no zero was detected. Note this function is approximate and is not guaranteed to find strictly the first zero.
find_a_nonzero x len offset returns the offset in x of a nonzero character after offset, or None if none could be detected. Note this function is approximate and is not guaranteed to find strictly the first nonzero.
val fold_over_nonzeros :
string ->
int ->
(int -> int) ->
(int -> int) ->
('a -> substring -> 'a) ->
'a ->
'afold_over_nonzeros buf len rounddown roundup f initial folds f over all (start, length) pairs of non-zero data in string buf up to len. The start of each pair is rounded down with rounddown and the end offset of each pair is rounded up with roundup (e.g. to potential block boudaries.