feat(parser): add hierarchy scans and selective cell reads
Reuse library builders and cell traversal for full reads, lightweight hierarchy scans, and exact cell byte ranges. Preserve file offsets across readers and reject malformed ranges and FFI pointer/count inputs without aborting. Document scan schemas and ID assignment. Add regression coverage for Arrow round trips, transforms, subset ordering, empty selections, and invalid input.
This commit is contained in:
parent
24438c4840
commit
9643089f2d
1 changed files with 848 additions and 56 deletions
|
|
@ -27,7 +27,10 @@ impl RecordHeader {
|
|||
pub fn read(input: &[u8]) -> IResult<'_, RecordHeader> {
|
||||
let (input, size) = parse_u16(input)?;
|
||||
let (input, tag) = parse_u16(input)?;
|
||||
Ok((input, RecordHeader{tag, data_size:size - 4}))
|
||||
let Some(data_size) = size.checked_sub(4) else {
|
||||
return fail(input, format!("Record size {size} is smaller than its header"));
|
||||
};
|
||||
Ok((input, RecordHeader{tag, data_size}))
|
||||
}
|
||||
|
||||
pub fn pack_into(&self) -> [u8; 4] {
|
||||
|
|
|
|||
Loading…
Reference in a new issue