helpers

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HammingDistance

func HammingDistance(hashOne, hashTwo string) (int, error)

Calculate the hamming distance between two PDQ hashes. Input hashes should be 64-character hexidecimal strings. Returns a value between 0 (identical) and 256 (completely different).

func PdqHashToBinary

func PdqHashToBinary(input string) (string, error)

Converts a 64-character hexidecimal PDQ hash into a 256-character binary string representation, useful for inserting into some vector stores.

func ResizeIfNeeded

func ResizeIfNeeded(img image.Image) image.Image

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL