// We use a limited amount of data over and over again and ensure
// that it is larger than the compression window (32KB), and also
// large enough to serve all typical value sizes we want to write.
Random rnd = new Random(301);
data = Slices.allocate(1048576 + 100);
SliceOutput sliceOutput = data.output();
while (sliceOutput.size() < 1048576) {
// Add a short fragment that is as compressible as specified
// by FLAGS_compression_ratio.
sliceOutput.writeBytes(compressibleString(rnd, compressionRatio, 100));
}
}