OapIndexEntry
- Namespace: Turian.Engine.Core
- Source File: OapFormat.cs
In-memory view of a 64-byte OAP index entry.
Properties
AssetId
(Guid) : Gets the 128-bit stable asset identifier (the primary key).
DataOffset
(ulong) : Gets the absolute offset of the stored (possibly compressed and encrypted) blob.
StoredSize
(ulong) : Gets the blob size on disk, in bytes.
UncompressedSize
(ulong) : Gets the size of the asset after decompression, in bytes.
ContentCrc32
(uint) : Gets the CRC-32 of the uncompressed, unencrypted asset bytes.
Compression
(OapCompression) : Gets the compression codec applied to the plaintext.
AssetType
(byte) : Gets the application-defined category byte (0 = unknown).
Encryption
(OapEncryption) : Gets the encryption codec applied to the compressed blob.
VirtualPathOffset
(uint) : Gets the offset into the string table of this entry's virtual path.
VirtualPathLength
(ushort) : Gets the length in bytes of this entry's virtual path.
DependencyCount
(ushort) : Gets the number of dependency ids declared by this entry.
DependencyOffset
(ulong) : Gets the absolute offset of this entry's dependency list, or 0 when it has none.
Public Methods
Write
public void Write(Span<byte> destination)
Serialises this entry into a 64-byte buffer.
Parameters:
destination(Span): A span of at least IndexEntrySizebytes.
Read
public static OapIndexEntry Read(ReadOnlySpan<byte> data)
Parses an index entry from the start of data.
Parameters:
data(ReadOnlySpan): A span of at least IndexEntrySizebytes.
Returns: OapIndexEntry
- The parsed entry.