pub fn read_header( cursor: &mut Cursor<'_>, magic: [u8; 4], allowed_flags: u8, ) -> Result<u8>
Reads magic, version and flags. Returns the flags, which must lie within allowed_flags.
allowed_flags