small fix in hash from zsdiff
This commit is contained in:
@@ -109,10 +109,11 @@ pub async fn zsdiff(
|
|||||||
utils::compress_parts(parts, &fs::File::create(output_filename)?, level).await;
|
utils::compress_parts(parts, &fs::File::create(output_filename)?, level).await;
|
||||||
let output_data = fs::read(output_filename)?;
|
let output_data = fs::read(output_filename)?;
|
||||||
let size_after = output_data.len();
|
let size_after = output_data.len();
|
||||||
let output_hash = format!("{} {}", get_hash(output_data).await, output_filename);
|
let hash = get_hash(output_data).await;
|
||||||
|
let output_hash = format!("{} {}", hash.clone(), output_filename);
|
||||||
fs::File::create(format!("{}.md5", output_filename))?.write_all(output_hash.as_bytes())?;
|
fs::File::create(format!("{}.md5", output_filename))?.write_all(output_hash.as_bytes())?;
|
||||||
let elapsed = now.elapsed();
|
let elapsed = now.elapsed();
|
||||||
println!("Zsdiff hash: {}", output_hash);
|
println!("Zsdiff hash: {}", hash);
|
||||||
println!("Size before: {:.1?}KB", size_before / 1024);
|
println!("Size before: {:.1?}KB", size_before / 1024);
|
||||||
println!("Size after: {:.1?}KB", size_after / 1024);
|
println!("Size after: {:.1?}KB", size_after / 1024);
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
Reference in New Issue
Block a user