2 * Copyright (c) Meta Platforms, Inc. and affiliates.
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
8 * You may select, at your option, one of the above-listed licenses.
14 #define XXH_STATIC_LINKING_ONLY
17 #include <stddef.h> /* size_t */
23 SEQ_gen_max /* Must be the last value */
26 /* Internal state, do not use */
28 XXH64_state_t xxh; /* xxh state for all the data produced so far (seed=0) */
30 int state; /* enum to control state machine (clean=0) */
35 SEQ_stream SEQ_initStream(unsigned seed);
43 /* Returns non-zero until the current type/value has been generated.
44 * Must pass the same type/value until it returns 0.
46 * Recommended to pick a value in the middle of the range you want, since there
47 * may be some noise that causes actual results to be slightly different.
48 * We try to be more accurate for smaller values.
50 * NOTE: Very small values don't work well (< 6).
52 size_t SEQ_gen(SEQ_stream* stream, SEQ_gen_type type, unsigned value,
55 /* Returns the xxhash of the data produced so far */
56 XXH64_hash_t SEQ_digest(SEQ_stream const* stream);