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

Function sign_extend

nodedb-codec/src/double_delta.rs:271–274  ·  view source on GitHub ↗
(value: i64, bits: u32)

Source from the content-addressed store, hash-verified

269}
270
271fn sign_extend(value: i64, bits: u32) -> i64 {
272 let shift = 64 - bits;
273 (value << shift) >> shift
274}
275
276// ---------------------------------------------------------------------------
277// Re-export types for lib.rs consistency

Callers 1

decode_dodFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected