bom/lib.rs
1//! Low-level parser for Apple BOM stores.
2//!
3//! The stable crate root intentionally stays small: use [`BOM`] to open a store
4//! and traverse blocks and trees, and use [`raw`] when you need the `deku`
5//! structs that mirror on-disk layout.
6
7mod bom;
8mod model;
9pub mod raw;
10
11pub use crate::bom::{BOM, BOMBlock, BOMEror, BOMResult, ByteSlice, ByteSource};
12
13pub(crate) fn deku_read_str(bytes: Vec<u8>) -> Result<String, deku::DekuError> {
14 Ok(String::from_utf8_lossy(&bytes)
15 .trim_end_matches('\0')
16 .to_string())
17}