MCPcopy Create free account
hub / github.com/apache/paimon-rust / encode_varint

Function encode_varint

crates/blob_test_utils.rs:90–97  ·  view source on GitHub ↗
(value: i64, out: &mut Vec<u8>)

Source from the content-addressed store, hash-verified

88}
89
90fn encode_varint(value: i64, out: &mut Vec<u8>) {
91 let mut remaining = ((value << 1) ^ (value >> 63)) as u64;
92 while (remaining & !0x7f) != 0 {
93 out.push(((remaining & 0x7f) as u8) | 0x80);
94 remaining >>= 7;
95 }
96 out.push(remaining as u8);
97}

Callers 1

encode_delta_varintsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected