From cc485d95661e7fe6966fb9e84f085fd74593a3c0 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Sat, 14 Mar 2020 18:14:21 +0100 Subject: [PATCH] Change fn new to accept a file instead of a BufWriter/BufReader Change the function new for the BDFWriter and BDFReader to accept a File instead of a BufWriter or BufReader since it's boilerplate code --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 022ff5f..ea94096 100644 --- a/src/main.rs +++ b/src/main.rs @@ -269,12 +269,13 @@ fn decrypt_with_dictionary_file( chunk_count = meta.chunk_count; } let mut pb = ProgressBar::new(chunk_count as u64); - let (rx, tx) = sync_channel::>(100); + let (rx, tx) = sync_channel::>(1000); let _handle = thread::spawn(move || { let mut lookup_table = HashLookupTable::new(HashMap::new()); if let Ok(table) = bdf_file.read_lookup_table() { lookup_table = table.clone(); } + /// TODO extract data entries in separate threads while let Ok(next_chunk) = &mut bdf_file.next_chunk() { if let Ok(entries) = next_chunk.data_entries(&lookup_table) { if let Err(_) = rx.send(entries) {}