MerkleTree
Parameters
numBlocks
number of real (non-padding) block hashes in the file. Must be >= 1.
blocksPerPiece
blocks contained in one piece, always a power of two. This fixes where the piece layer sits relative to the leaves. For the common case where a piece is a block, pass 1.
root
the file's known root hash (the apex). Verification compares against this. May be null when the root is not yet known (e.g. building a tree to then read its root).