Key Value Document Store (KVDS)

An efficient key-value store for encoding documents.

Build Status crates.io docs.rs license: MIT OR Apache-2.0

Features

KVDS is a format for encoding key-value lists where the key is a single u8 and the value is an array (called a Vec in Rust) of u8.

Usage

This crate, KVDS, is meant to be used as a Rust library. See the basic example for more information.

A note about storing Strings

One of the most common types of data held in the value field is a string. In Rust, a Vec<u8> can be converted to a String as follows:

rust String::from(std::str::from_utf8(&VEC_U8[..]).unwrap());

The String can be converted back as follows:

rust STRING.as_bytes().to_vec();

Saving to a file

The process of saving to a file is currently pretty complicated. It is detailed in the files example.

Size limits

Keys can only be one byte. There are therefore 256 distinct keys.

Values can be up to 18.4 exabytes. Needless to say, there are many, many unique combinations.

(AFAIK, 18.4 exabytes is also the theoretical limit for RAM in 64-bit CPUs).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.