2017-08-18 16:52:05 -07:00
|
|
|
/*
|
2020-03-26 15:19:05 -07:00
|
|
|
* Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
|
2016-08-30 10:04:33 -07:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
2017-08-18 16:52:05 -07:00
|
|
|
* This source code is licensed under both the BSD-style license (found in the
|
|
|
|
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
|
|
* in the COPYING file in the root directory of this source tree).
|
2017-09-08 00:09:23 -07:00
|
|
|
* You may select, at your option, one of the above-listed licenses.
|
2016-08-30 10:04:33 -07:00
|
|
|
*/
|
2017-08-18 16:52:05 -07:00
|
|
|
|
|
|
|
|
2016-09-22 17:12:50 -07:00
|
|
|
#ifndef DATAGEN_H
|
|
|
|
#define DATAGEN_H
|
2015-02-08 23:00:26 -08:00
|
|
|
|
2015-02-10 09:15:20 -08:00
|
|
|
#include <stddef.h> /* size_t */
|
|
|
|
|
2015-08-23 15:13:49 -07:00
|
|
|
void RDG_genStdout(unsigned long long size, double matchProba, double litProba, unsigned seed);
|
2015-02-10 09:15:20 -08:00
|
|
|
void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed);
|
2015-11-30 16:31:17 -08:00
|
|
|
/*!RDG_genBuffer
|
2015-07-07 18:26:17 -07:00
|
|
|
Generate 'size' bytes of compressible data into 'buffer'.
|
2015-08-23 15:13:49 -07:00
|
|
|
Compressibility can be controlled using 'matchProba', which is floating point value between 0 and 1.
|
|
|
|
'LitProba' is optional, it affect variability of individual bytes. If litProba==0.0, default value will be used.
|
2015-07-07 18:26:17 -07:00
|
|
|
Generated data pattern can be modified using different 'seed'.
|
2015-08-23 15:13:49 -07:00
|
|
|
For a triplet (matchProba, litProba, seed), the function always generate the same content.
|
2015-02-10 09:15:20 -08:00
|
|
|
|
2015-08-23 15:13:49 -07:00
|
|
|
RDG_genStdout
|
|
|
|
Same as RDG_genBuffer, but generates data into stdout
|
2015-02-10 09:15:20 -08:00
|
|
|
*/
|
2016-09-22 17:12:50 -07:00
|
|
|
|
|
|
|
#endif
|