zstd dict refactorings
This commit is contained in:
@@ -43,14 +43,23 @@ fn run_loop(pb: Arc<Mutex<Bar>>, args: Args) -> Result<(), Box<dyn std::error::E
|
||||
let mut rng = rand::thread_rng();
|
||||
let mut rand_data = vec![0u8; args.file_size];
|
||||
rng.fill(&mut rand_data[..]);
|
||||
let hints = vec![
|
||||
"foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply", "waldo", "fred", "plugh",
|
||||
"xyzzy", "thud",
|
||||
];
|
||||
|
||||
loop {
|
||||
// tweak a byte in the data
|
||||
let idx = rng.gen_range(0..rand_data.len());
|
||||
rand_data[idx] = rng.gen();
|
||||
let hint = hints[rng.gen_range(0..hints.len())];
|
||||
|
||||
let form = reqwest::blocking::multipart::Form::new()
|
||||
.text("content_type", "text/plain")
|
||||
.part(
|
||||
"compression_hint",
|
||||
reqwest::blocking::multipart::Part::text(hint),
|
||||
)
|
||||
.part(
|
||||
"data",
|
||||
reqwest::blocking::multipart::Part::bytes(rand_data.clone()),
|
||||
|
||||
Reference in New Issue
Block a user