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

Function decode_change_file_key

atomic-core/src/pristine/tables.rs:1049–1054  ·  view source on GitHub ↗
(key: &[u8; 36])

Source from the content-addressed store, hash-verified

1047/// Returns `(change_hash, file_index)`.
1048#[inline]
1049pub fn decode_change_file_key(key: &[u8; 36]) -> ([u8; 32], u32) {
1050 let mut change_hash = [0u8; 32];
1051 change_hash.copy_from_slice(&key[0..32]);
1052 let file_index = u32::from_le_bytes([key[32], key[33], key[34], key[35]]);
1053 (change_hash, file_index)
1054}
1055
1056// Key Encoding Helpers
1057//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected