Skip to main content

Module binary_codec

Module binary_codec 

Source
Expand description

VectorCodec implementation for binary quantization.

Introduces the BinaryCodec wrapper struct (holding dim) and implements the dual-phase trait using the sign-bit encoding and Hamming distance functions from binary. The prepared query is pre-encoded to bits; both symmetric and asymmetric distances delegate to hamming_distance.

Structsยง

BinaryCodec
Binary quantization codec (sign-bit encoding, Hamming distance).
BinaryQuantized
Thin newtype wrapping UnifiedQuantizedVector for binary-encoded vectors.