Skip to content

A micro key-value store where the key is always one byte

License

Notifications You must be signed in to change notification settings

Kerollmops/obkv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obkv

A micro key-value store where the key is always one byte. It is highly inspired by the KVDS crate.

Usage

let mut writer = KvWriter::memory();
writer.insert(0, b"hello").unwrap();
writer.insert(1, b"blue").unwrap();
writer.insert(255, b"world").unwrap();
let obkv = writer.into_inner().unwrap();

let reader = KvReader::new(&obkv);
assert_eq!(reader.get(0), Some(&b"hello"[..]));
assert_eq!(reader.get(1), Some(&b"blue"[..]));
assert_eq!(reader.get(10), None);
assert_eq!(reader.get(255), Some(&b"world"[..]));

About

A micro key-value store where the key is always one byte

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published