| 16 | { |
| 17 | template <typename Engine> |
| 18 | string GenerateRandomString(Engine & engine) |
| 19 | { |
| 20 | int const kMinLength = 0; |
| 21 | int const kMaxLength = 400; |
| 22 | |
| 23 | int const kMinByte = 0; |
| 24 | int const kMaxByte = 255; |
| 25 | |
| 26 | uniform_int_distribution<int> length(kMinLength, kMaxLength); |
| 27 | uniform_int_distribution<int> byte(kMinByte, kMaxByte); |
| 28 | string s(length(engine), '\0'); |
| 29 | for (auto & b : s) |
| 30 | b = byte(engine); |
| 31 | return s; |
| 32 | } |
| 33 | |
| 34 | void DumpStrings(vector<string> const & strings, uint64_t blockSize, vector<uint8_t> & buffer) |
| 35 | { |