Path: blob/main/sys/contrib/zstd/programs/lorem.h
289023 views
/*1* Copyright (c) Meta Platforms, Inc. and affiliates.2* All rights reserved.3*4* This source code is licensed under both the BSD-style license (found in the5* LICENSE file in the root directory of this source tree) and the GPLv2 (found6* in the COPYING file in the root directory of this source tree).7* You may select, at your option, one of the above-listed licenses.8*/910/* lorem ipsum generator */1112#include <stddef.h> /* size_t */1314/*15* LOREM_genBuffer():16* Generate @size bytes of compressible data using lorem ipsum generator17* into provided @buffer.18*/19void LOREM_genBuffer(void* buffer, size_t size, unsigned seed);2021/*22* LOREM_genBlock():23* Similar to LOREM_genBuffer, with additional controls :24* - @first : generate the first sentence25* - @fill : fill the entire @buffer,26* if ==0: generate one paragraph at most.27* @return : nb of bytes generated into @buffer.28*/29size_t LOREM_genBlock(void* buffer, size_t size,30unsigned seed,31int first, int fill);323334