pub fn decode(
codec_id: CodecId,
compressed: &[u8],
) -> Result<Vec<u8>, DecompressError>Expand description
Decode a previously encoded vector.
Inverse of encode. Returns the original f32 bytes (length = 4 × dim)
for symmetric codecs (Uncompressed, TurboQuant, FibQuant). For
asymmetric codecs (Polar, Qjl) the wire format is a sketch / code
that does not admit full reconstruction; the decode path is a no-op
pass-through and the caller must use the codec’s score_* methods to
estimate similarity against a known query.
§Errors
Returns DecompressError if the codec is unavailable, the compressed
bytes fail to deserialize, the profile cannot be rebuilt, or the
underlying codec decode fails.