pub unsafe extern "C" fn ZDICT_optimizeTrainFromBuffer_fastCover(
dictBuffer: *mut c_void,
dictBufferCapacity: usize,
samplesBuffer: *const c_void,
samplesSizes: *const usize,
nbSamples: c_uint,
parameters: *mut ZDICT_fastCover_params_t,
) -> usize
Expand description
ZDICT_optimizeTrainFromBuffer_fastCover():
The same requirements as above hold for all the parameters except parameters
.
This function tries many parameter combinations (specifically, k and d combinations)
and picks the best parameters. *parameters
is filled with the best parameters found,
dictionary constructed with those parameters is stored in dictBuffer
.
All of the parameters d, k, steps, f, and accel are optional.
If d is non-zero then we don’t check multiple values of d, otherwise we check d = {6, 8}.
if steps is zero it defaults to its default value.
If k is non-zero then we don’t check multiple values of k, otherwise we check steps values in [50, 2000].
If f is zero, default value of 20 is used.
If accel is zero, default value of 1 is used.
@return: size of dictionary stored into dictBuffer
(<= dictBufferCapacity
)
or an error code, which can be tested with ZDICT_isError().
On success *parameters
contains the parameters selected.
See ZDICT_trainFromBuffer() for details on failure modes.
Note: ZDICT_optimizeTrainFromBuffer_fastCover() requires about 6 * 2^f bytes of memory for each thread.