fuzzysearch/fuzzysearch-common/src/lib.rs

14 lines
340 B
Rust
Raw Normal View History

2020-12-07 23:41:32 +00:00
pub mod types;
pub mod video;
/// Create an instance of img_hash with project defaults.
pub fn get_hasher() -> img_hash::Hasher<[u8; 8]> {
use img_hash::{HashAlg::Gradient, HasherConfig};
HasherConfig::with_bytes_type::<[u8; 8]>()
.hash_alg(Gradient)
.hash_size(8, 8)
.preproc_dct()
.to_hasher()
}