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

Method from_bytes

nodedb-codec/src/vector_quant/bbq.rs:127–129  ·  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

125
126 /// Deserialize a codec from a byte buffer produced by [`Self::to_bytes`].
127 pub fn from_bytes(buf: &[u8]) -> Result<Self, CodecError> {
128 codec_envelope::decode(Self::ENVELOPE_MAGIC, Self::ENVELOPE_VERSION, buf)
129 }
130
131 // ── Internal helpers ─────────────────────────────────────────────────────
132

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.70

Tested by

no test coverage detected