MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / from_bytes

Method from_bytes

nodedb-codec/src/vector_quant/rabitq.rs:174–176  ·  view source on GitHub ↗

Deserialize a codec from a byte buffer produced by [`Self::to_bytes`].

(buf: &[u8])

Source from the content-addressed store, hash-verified

172
173 /// Deserialize a codec from a byte buffer produced by [`Self::to_bytes`].
174 pub fn from_bytes(buf: &[u8]) -> Result<Self, CodecError> {
175 codec_envelope::decode(Self::ENVELOPE_MAGIC, Self::ENVELOPE_VERSION, buf)
176 }
177
178 /// Apply the randomised WHT rotation to a residual vector.
179 ///

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.70

Tested by

no test coverage detected