| Crates.io | fast-tlsh |
| lib.rs | fast-tlsh |
| version | 0.1.8 |
| created_at | 2024-03-27 03:12:20.807331+00 |
| updated_at | 2025-02-15 09:49:53.842347+00 |
| description | Library to generate / parse / compare TLSH locality sensitive hashes |
| homepage | https://github.com/a4lg/fast-tlsh |
| repository | https://github.com/a4lg/fast-tlsh |
| max_upload_size | |
| id | 1187481 |
| size | 428,770 |
TLSH stands for Trendmicro Locality Sensitive Hash. TLSH can be used to detect similar files.
You can generate / parse / compare (TLSH-compatible) LSHs with this crate.
Thanks to SIMD-friendly optimizations and its memory layout, comparing two LSHs are significantly faster than the original implementation. Even if you turn off real SIMD (to forbid any unsafe code), it employs pseudo-SIMD operations and additional tables to speed up the comparison.
Also, it speeds up generating fuzzy hashes (~50% faster) using the "double update" table optimization.
alloc and std (default)no_std (by disabling both of them) and
alloc and std are built on the minimum no_std implementation.
Those features enable implementations that depend on alloc and std,
respectively.easy-functions (default)simd (default; fast but unsafe)detect-features (default; marginally slow but convenient)std.simd feature is enabled and there's the case where switching
between SIMD and non-SIMD implementations are feasible, it turns on the
runtime checks to switch the implementation dynamically.opt-default (default; Recommended if no default features are enabled)opt-embedded-default (Turn off the default features if you use this)strict-parserunsafe (marginally fast but unsafe)unsafe. Note that, enabling this feature will
not (normally) speed up the program significantly.unstablerustc and should not be considered stable (don't expect SemVer-compatible
semantics).serdetests-slowFor all features (including minor tuning-related ones), see the documentation.