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

Method write

nodedb/src/engine/kv/hash_helpers.rs:37–41  ·  view source on GitHub ↗
(&mut self, bytes: &[u8])

Source from the content-addressed store, hash-verified

35 }
36
37 fn write(&mut self, bytes: &[u8]) {
38 for &b in bytes {
39 self.hash = self.hash.rotate_left(5) ^ (b as u64).wrapping_mul(FX_SEED);
40 }
41 }
42}
43
44/// Compute the hash for a key using the FxHash algorithm.

Callers 7

hash_keyFunction · 0.45
registerMethod · 0.45
unregisterMethod · 0.45
loadMethod · 0.45
registerMethod · 0.45
unregisterMethod · 0.45
clear_and_reloadMethod · 0.45

Calls 1

rotate_leftMethod · 0.80

Tested by

no test coverage detected