Expand description
§hashrope
A BB[2/7] weight-balanced binary tree augmented with polynomial hash metadata at every node.
Zero dependencies by default. no_std + alloc compatible, including
the optional bigint feature for Python-compatible arbitrary precision.
The default API uses bit-folding Mersenne modular reduction; the optional
arbitrary-precision API uses BigUint modular arithmetic.
Nodes are stored in a contiguous arena for cache-friendly access.
Re-exports§
pub use polynomial_hash::mersenne_mod;pub use polynomial_hash::mersenne_mul;pub use polynomial_hash::phi;pub use polynomial_hash::PolynomialHash;pub use polynomial_hash::MERSENNE_61;pub use rope::rope_concat;pub use rope::rope_equal;pub use rope::rope_from_bytes;pub use rope::rope_hash;pub use rope::rope_height;pub use rope::rope_lcp;pub use rope::rope_len;pub use rope::rope_range_equal;pub use rope::rope_range_lcp;pub use rope::rope_repeat;pub use rope::rope_split;pub use rope::rope_substr_hash;pub use rope::rope_to_bytes;pub use rope::validate_rope;pub use rope::Arena;pub use rope::Node;pub use rope::NodeId;pub use rope::NodeInner;pub use rope::LAZY_SENTINEL;pub use sliding::SlidingWindow;
Modules§
- polynomial_
hash - Polynomial hash over Z/pZ with Mersenne prime arithmetic.
- rope
- Hash rope data structure with arena-based allocation.
- sliding
- Sliding window hash rope for streaming hash computation.
Constants§
- MERSENNE_
127 - The 127-bit Mersenne prime. Use the optional
bigintmodule for hashing with this modulus; the existingu64API retains its 61-bit default.