MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / undelta

Function undelta

atomic-core/examples/graph_codec_lab/codec.rs:98–102  ·  view source on GitHub ↗
(input: &mut &[u8], previous: &mut u64)

Source from the content-addressed store, hash-verified

96 *previous = next;
97}
98fn undelta(input: &mut &[u8], previous: &mut u64) -> Result<u64> {
99 let z = get(input)?;
100 *previous = previous.wrapping_add((z >> 1) ^ 0u64.wrapping_sub(z & 1));
101 Ok(*previous)
102}
103
104#[derive(Default)]
105struct Writer {

Callers 2

numericFunction · 0.70
replayFunction · 0.70

Calls 1

getFunction · 0.70

Tested by

no test coverage detected