mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-31 20:45:34 +00:00
faster hashing algorithm
This commit is contained in:
@@ -67,6 +67,7 @@ pub fn duplicate_hashes(connection: &sqlite::Connection, path: &String) -> Resul
|
||||
ORDER BY a.file_identifier
|
||||
", path
|
||||
);
|
||||
|
||||
let result: Vec<File> = connection
|
||||
.prepare(query)?
|
||||
.into_iter()
|
||||
|
||||
@@ -48,7 +48,7 @@ pub fn print(duplicates: Vec<File>) {
|
||||
group.into_iter().for_each(|file| {
|
||||
println!(
|
||||
"| {0: <16} | {1: <35} | {2: <16} | {3: <32} |",
|
||||
&file.hash[0..16].red(),
|
||||
file.hash.red(),
|
||||
format_path(&file.path).yellow(),
|
||||
file_size(&file.path).blue(),
|
||||
modified_time(&file.path).blue()
|
||||
|
||||
@@ -6,7 +6,7 @@ use itertools::Itertools;
|
||||
use rayon::prelude::*;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use xxhash_rust::xxh3::xxh3_64 as hasher;
|
||||
use fxhash::hash32 as hasher;
|
||||
|
||||
pub fn duplicates(app_opts: &App, connection: &sqlite::Connection) -> Result<Vec<File>> {
|
||||
let scan_results = scan(app_opts, connection)?;
|
||||
|
||||
Reference in New Issue
Block a user