···117117- `mst node` (DAG-CBOR): object with the following schema
118118 - `l` (hash link, optional): reference to a subtree at a lower depth containing only keys to the left of this node. if absent, there is no left subtree.
119119 - `L` (bool, optional): "archived": if `true`, the subtree is contained in this archive. must not be present when `l` is not present.
120120- - `e` (array, required): ordered array of entry objects with length of at least one, each containing:
120120+ - `e` (array, required): ordered array of entry objects, each containing:
121121 - `p` (integer, required): number of bytes shared with the previous entry (TODO [key compression](https://www.ietf.org/archive/id/draft-holmgren-at-repository-00.html#name-mst-node-schema) actually)
122122 - `k` (byte string, required): key suffix remaining
123123 - `v` (hash link, optional): reference to the record data for this key.
+3-1
src/lib.rs
···22pub mod parser;
33pub mod ser;
44pub mod types;
55+pub mod validation;
5667#[cfg(feature = "blocking")]
78pub mod blocking;
···11121213pub use error::{Result, StarError};
1314pub use parser::StarParser;
1414-pub use ser::StarEncoder;
1515+pub use ser::{StarEncoder, StarSerializer};
1516pub use types::{RepoMstEntry, RepoMstNode, StarCommit, StarItem, StarMstEntry, StarMstNode};
1717+pub use validation::StarValidator;
16181719#[cfg(feature = "blocking")]
1820pub use blocking::StarIterator;
-2
src/parser.rs
···247247 let mut key = if e.p as usize <= prev_key_bytes.len() {
248248 prev_key_bytes[..e.p as usize].to_vec()
249249 } else {
250250- // If prefix len > prev key len, invalid compression
251251- // Although spec says "shared prefix bytes", usually <= prev.len()
252250 prev_key_bytes.clone()
253251 };
254252 key.extend_from_slice(&e.k);