Skip to content

Commit 92df5de

Browse files
committed
refactor: reduces large file threshold for md5 calc
Reduces the threshold for considering a file "large" when calculating its MD5 hash, lowering it from 100MB to 16MB.
1 parent 1c2ef32 commit 92df5de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn get_xml_url(original_url: &str) -> String {
101101
fn calculate_md5(file_path: &str) -> Result<String, std::io::Error> {
102102
let file = File::open(file_path)?;
103103
let file_size = file.metadata()?.len();
104-
let is_large_file = file_size > 100 * 1024 * 1024; // 100 MB threshold
104+
let is_large_file = file_size > 16 * 1024 * 1024; // 16 MB threshold
105105

106106
let mut reader = BufReader::with_capacity(8192, file);
107107
let mut context = md5::Context::new();

0 commit comments

Comments
 (0)