# Functions
Hash hashes the data and the span using the bmt hasher.
New creates a reusable Hasher implements the hash.Hash interface pulls a new tree from a resource pool for hashing each chunk.
NewRefHasher returns a new RefHasher.
NewTreePool creates a tree pool with hasher, segment size, segment count and capacity on Hasher.getTree it reuses free trees or creates a new one if capacity is not reached.
# Constants
PoolSize is the maximum number of bmt trees used by the hashers, i.e, the maximum number of concurrent BMT hashing operations performed by the same hasher.
SegmentCount is the maximum number of segments of the underlying chunk Should be equal to max-chunk-data-size / hash-size.
# Structs
Hasher a reusable hasher for fixed maximum size chunks representing a BMT - implements the hash.Hash interface - reuses a pool of trees for amortised memory allocation and resource control - supports order-agnostic concurrent segment writes (TODO:) as well as sequential read and write - the same hasher instance must not be called concurrently on more than one chunk - the same hasher instance is synchronously reuseable - Sum gives back the tree to the pool and guaranteed to leave the tree and itself in a state reusable for hashing a new chunk - generates and verifies segment inclusion proofs (TODO:).
RefHasher is the non-optimized easy-to-read reference implementation of BMT.
TreePool provides a pool of trees used as resources by Hasher a tree popped from the pool is guaranteed to have clean state for hashing a new chunk.
# Type aliases
BaseHasherFunc is a hash.Hash constructor function used for the base hash of the BMT.