None
PL
Conflict-free Database over Virtual File System
[]
Bartosz Sypytkowski
let entry_len = key.len() + value.len() + 20; let mut buf = Vec::with_capacity(entry_len); // write total length of the entry buf.extend_from_slice(&(entry_len as u32).to_le_bytes()); // write key length buf.extend_from_slice(&(key.len() as u32).to_le_bytes()); // write timestamp buf.extend_from_slice(×tamp.to_le_bytes()); // write key buf.extend_from_slice(key); // write value buf.extend_from_slice(value); // write checksum let mut crc = crc32fast::Hasher::new(); crc.update(&buf); let checksum = crc.finalize(); let checksum_bytes = checksum.to_le_bytes(); buf.extend_from_slice(&checksum_bytes); // construct marker used later to locate session file holding // this entry and location of an entry itself within a file let entry = DbEntry::new( self.sid.clone(), timestamp, file_position,…