Expand description
Tree diff operations for efficient incremental updates
Computes the difference between two merkle trees, identifying which hashes exist in the new tree but not the old tree. This enables efficient push operations where only changed content is uploaded.
§Key Optimization: Subtree Pruning
When a subtree’s root hash matches between old and new trees, the entire subtree is skipped - no need to traverse it since identical hash means identical content.
Structs§
Functions§
- collect_
hashes - Collect all hashes in a tree using parallel traversal
- collect_
hashes_ with_ progress - Collect hashes with optional progress tracking
- tree_
diff - Compute diff between two trees
- tree_
diff_ streaming - Streaming diff - yields hashes as they’re discovered
- tree_
diff_ with_ old_ hashes - Compute diff given pre-computed old hashes