Skip to main content

parse_form

Function parse_form 

Source
pub fn parse_form(data: &[u8]) -> Result<Form<'_>, IffError>
Expand description

Parse a DjVu IFF byte stream into a Form.

This is the new spec-based zero-copy parser. It returns borrowed data from the input slice.

ยงErrors

Returns IffError if:

  • The data does not begin with the AT&T magic bytes
  • The FORM chunk header is missing or malformed
  • Any chunk extends beyond the available data