zstd/programs/datagen.h

25 lines
1.1 KiB
C
Raw Normal View History

2016-08-30 17:04:33 +00:00
/**
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
2015-02-10 17:15:20 +00:00
#include <stddef.h> /* size_t */
void RDG_genStdout(unsigned long long size, double matchProba, double litProba, unsigned seed);
2015-02-10 17:15:20 +00:00
void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed);
2015-12-01 00:31:17 +00:00
/*!RDG_genBuffer
2015-07-08 01:26:17 +00:00
Generate 'size' bytes of compressible data into 'buffer'.
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-08 01:26:17 +00:00
Generated data pattern can be modified using different 'seed'.
For a triplet (matchProba, litProba, seed), the function always generate the same content.
2015-02-10 17:15:20 +00:00
RDG_genStdout
Same as RDG_genBuffer, but generates data into stdout
2015-02-10 17:15:20 +00:00
*/