datagen refactoring

This commit is contained in:
Yann Collet
2015-02-10 18:15:20 +01:00
parent 6610cb381c
commit fb98fd0bd4
5 changed files with 84 additions and 69 deletions
+14 -1
View File
@@ -24,4 +24,17 @@
*/
void RDG_generate(unsigned long long size, unsigned seed, double matchProba, double litProba);
#include <stddef.h> /* size_t */
void RDG_genOut(unsigned long long size, double matchProba, double litProba, unsigned seed);
void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed);
/* RDG_genOut
Generate 'size' bytes of compressible data into stdout.
Compressibility can be controlled using 'matchProba'.
'LitProba' is optional, and affect variability of bytes. If litProba==0.0, default value is used.
Generated data can be selected using 'seed'.
If (matchProba, litProba and seed) are equal, the function always generate the same content.
RDG_genBuffer
Same as RDG_genOut, but generate data into provided buffer
*/