1 /* 2 datagen.h - compressible data generator header 3 Copyright (C) Yann Collet 2012-2016 4 5 GPL v2 License 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License along 18 with this program; if not, write to the Free Software Foundation, Inc., 19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 21 You can contact the author at : 22 - LZ4 source repository : https://github.com/lz4/lz4 23 - Public forum : https://groups.google.com/forum/#!forum/lz4c 24 */ 25 26 27 #include <stddef.h> /* size_t */ 28 29 void RDG_genOut(unsigned long long size, double matchProba, double litProba, unsigned seed); 30 void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed); 31 /* RDG_genOut 32 Generate 'size' bytes of compressible data into stdout. 33 Compressibility can be controlled using 'matchProba'. 34 'LitProba' is optional, and affect variability of bytes. If litProba==0.0, default value is used. 35 Generated data can be selected using 'seed'. 36 If (matchProba, litProba and seed) are equal, the function always generate the same content. 37 38 RDG_genBuffer 39 Same as RDG_genOut, but generate data into provided buffer 40 */ 41