Merkle Binary Indexed Tree (Merkle-BIT)
This tree structure is a binary merkle tree with branch compression via split indexes. See here for a basic explanation of its purpose.
Basic Usage
To quickly get started and get a feel for the Merkle-BIT, you can use the already implemented HashTree structure.
extern crate starling;
use HashTree;
This structure can be used for small amounts of data, but all the data in the tree will persist in memory unless explicitly pruned.
For larger numbers of items to store in the tree, it is recommended to connect the structure to a database by implementing the Database trait for your database. This structure will also take advantage of batch writes if your database supports it.
You can take advantage of many of serde's serializing and deserializing data schemes prior to putting it into a database via the features of this crate. Additionally, there are several supported hashing schemes you can use via features in the crate.
To use the full power of the Merkle-BIT structure, you should customize the structures stored in the tree to match your needs.
extern crate starling;
use MerkleBIT;
use PathBuf;