car-parser-bom 0.0.1

Parser for Apple BOM files used by CarParser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Low-level parser for Apple BOM stores.
//!
//! The stable crate root intentionally stays small: use [`BOM`] to open a store
//! and traverse blocks and trees, and use [`raw`] when you need the `deku`
//! structs that mirror on-disk layout.

mod bom;
mod model;
pub mod raw;

pub use crate::bom::{BOM, BOMBlock, BOMEror, BOMResult, ByteSlice, ByteSource};

pub(crate) fn deku_read_str(bytes: Vec<u8>) -> Result<String, deku::DekuError> {
    Ok(String::from_utf8_lossy(&bytes)
        .trim_end_matches('\0')
        .to_string())
}