14 for (
int i = 0; i < len; i++) {
15 (*dst)[i] =
static_cast<char>(
' ' + rnd->
Uniform(95));
23 static const char kTestChars[] = {
24 '\0',
'\1',
'a',
'b',
'c',
'd',
'e',
'\xfd',
'\xfe',
'\xff'
27 for (
int i = 0; i < len; i++) {
28 result += kTestChars[rnd->
Uniform(
sizeof(kTestChars))];
35 int len, std::string* dst) {
36 int raw =
static_cast<int>(len * compressed_fraction);
43 while (dst->size() < len) {
44 dst->append(raw_data);
Slice CompressibleString(Random *rnd, double compressed_fraction, int len, std::string *dst)
std::string RandomKey(Random *rnd, int len)
Slice RandomString(Random *rnd, int len, std::string *dst)