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 the "default_tree" feature to use serde and bincode for serializing and deserializing data prior to putting it into a database (see the integration test for details).
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;