Skip to content

Version 0.3.0: "Landing on the Stairs"

Choose a tag to compare

@a4lg a4lg released this 19 Jan 03:10
· 403 commits to main since this release

Some new features / changes planned for version 0.3 is postponed for 0.4.
For now, we should now land somewhere.

Master Plan on the Version 0.3 Line

  • New features
    • Prepare the foundation to implement those (no significant features are planned for this line).
  • Cleaning / Maintainability
    • Minimize the tests
      There's too much tests than necessary where a few test cases are just enough. While preserving the coverage, the author is planning to reduce the tests.
      There will be a test that would take hours to complete when the optimization is fully disabled (for fuzzy hash generators) but other "hours taking" tests just contain many duplicating cases with no corner cases and we'll minimize those.
    • Minimize the main implementation
      When sharing the code is desired, we will.
  • Reliability
    • Keep the coverage (raise it if possible)
      The reliability is the prime factor. We'll (at least) keep the coverage and raise it if possible.

Changes

  • API (Breaking)
    • The return type of FuzzyHashData::store_into_bytes() is changed from Result<(), FuzzyHashOperationError> to Result<usize, FuzzyHashOperationError> for convenience and more familiar semantics (like standard Read).
    • FuzzyHashComparisonTarget::raw_score_by_edit_distance() family accept block hash lengths as u8, not u32 in version 0.2 line for consistency with other methods (accept either u8 or usize).
    • From dual fuzzy hash type (FuzzyHashDualData), initialization methods from "the contents of raw fuzzy hash" are removed.
      Instead, object creation from "near raw contents of raw fuzzy hash" or "contents of raw fuzzy hash" methods are added.
    • If a type implements the BlockHashPositionArrayData trait, up to traits, BlockHashPositionArrayImpl and optionally BlockHashPositionArrayImplUnchecked are automatically implemented for those types (with default implementation).
    • Deprecated names are now removed.
  • API (Source code compatible but ABI Breaking)
    • Constraints for enum representations are no longer significant and are removed completely.
  • API (New)
    • On fuzzy hash type (FuzzyHashData), object creation from "near raw contents of a fuzzy hash" methods are added.
    • On dual fuzzy hash type (FuzzyHashDualData), object creation from "near raw contents of a fuzzy hash" or "contents of a fuzzy hash"
      methods are added. This is in parity with the normal fuzzy hash type (FuzzyHashData).
  • API (Compatible)
    • Some FuzzyHashData methods (related to normalization) are no longer inherent (no two implementations for raw and normalized variants but just one implementation) and easier to be used by generic functions (it also makes the manual less confusing).
  • Performance
    • Fix invariants for better chances of higher level optimizations.
      It applies to invariants that precede slice accesses.
    • Optimized FuzzyHashDualData::is_normalized() considering the constraints of the "reverse normalization" data.
  • Documentation
    • This crate is decided to be "safe by default".
    • Clarification to naturally provide the file name part of the fuzzy hash later on this version (v0.3.x).
  • Tests
    • Usual enhancements.

Crates.io: https://crates.io/crates/ffuzzy/0.3.0
Docs.rs: https://docs.rs/ffuzzy/0.3.0/ssdeep/

Full Changelog: v0.2.15...v0.3.0