Skip to main content

read_object_references

Function read_object_references 

Source
pub fn read_object_references(
    raw: &[u8],
    datatype: &Datatype,
    offset_size: u8,
) -> Result<Vec<ObjectReference>, FormatError>
Expand description

Read object references from raw bytes.

Object references are stored as offset_size-byte file addresses pointing to the object header of the referenced object. A reference consisting of all 0xFF bytes is a null (unset) reference.

§Arguments

  • raw — raw bytes read from the dataset
  • datatype — must be Datatype::Reference with ReferenceType::Object
  • offset_size — the file’s offset size (from superblock), typically 8