Skip to main content

bytes_to_embedding

Function bytes_to_embedding 

Source
pub fn bytes_to_embedding(bytes: &[u8]) -> Result<Vec<f32>, MemoryError>
Expand description

Decode a SQLite BLOB back to f32 values.

Returns an error if the byte length is not divisible by 4. Uses bytemuck::try_cast_slice for zero-copy decoding when alignment permits, falling back to manual decode otherwise.