-#[derive(Clone)]
-pub struct VarIndexRecord {
- /// Offset from the start of the file to the start of the record.
- pub offset: u64,
-
- /// The 1-based indexes of the variable indexes.
- pub dict_indexes: Vec<u32>,
-}
-
-impl Debug for VarIndexRecord {
- fn fmt(&self, f: &mut Formatter) -> FmtResult {
- write!(f, "apply to variables")?;
- for dict_index in self.dict_indexes.iter() {
- write!(f, " #{dict_index}")?;
+ let index_offset = r.stream_position()?;
+ let rec_type: u32 = endian.parse(read_bytes(r)?);
+ if rec_type != 4 {
+ return Err(Error::ExpectedVarIndexRecord {
+ offset: index_offset,
+ rec_type,
+ });