OapHeader

In-memory view of the 64-byte OAP file header.

Properties

Flags

(OapFlags) : Gets the header flag bits.

EntryCount

(uint) : Gets the number of index entries.

IndexOffset

(ulong) : Gets the absolute offset of the index.

IndexSize

(ulong) : Gets the index size in bytes (EntryCount × 64).

StringTableOffset

(ulong) : Gets the absolute offset of the string table.

StringTableSize

(ulong) : Gets the string table size in bytes.

ManifestOffset

(ulong) : Gets the absolute offset of the manifest, or 0 when absent.

ManifestSize

(uint) : Gets the manifest size in bytes, or 0 when absent.

Public Methods

Write

public void Write(Span<byte> destination)

Serialises this header into a 64-byte buffer, computing and appending header_crc32 over the first 60 bytes.

Parameters:

  • destination (Span): A span of at least HeaderSize bytes.

Read

public static OapHeader Read(ReadOnlySpan<byte> data)

Parses and validates a header from the start of data.

Parameters:

  • data (ReadOnlySpan): A span of at least HeaderSize bytes.

Returns: OapHeader

  • The parsed header.