1use nom::{
6 combinator::map,
7 number::complete::{be_u16, be_u32},
8 IResult,
9};
10
11use crate::util::{Bytes16, Bytes32};
12use fmt::Debug;
13use std::{borrow::Cow, fmt};
14
15pub mod container;
16pub mod cset;
17pub mod hcim;
18pub mod header;
19pub mod pbuf;
20pub mod sysp;
21pub mod tebu;
22
23#[derive(Debug)]
24struct SDoc<'a> {
25 charsets: Vec<Cow<'a, str>>,
26}
27
28pub fn bytes16(input: &[u8]) -> IResult<&[u8], Bytes16> {
30 map(be_u16, Bytes16)(input)
31}
32
33pub fn bytes32(input: &[u8]) -> IResult<&[u8], Bytes32> {
35 map(be_u32, Bytes32)(input)
36}