readArray

fnT[] readArray(T)(const(ubyte)[] data, size_t offset, size_t count, ElfEndian fileEndian)

Read an array of structs from a byte array.

This template function reads multiple packed structs from a byte array.

Parameters

dataThe byte array to read from.
offsetThe offset in bytes to start reading from.
countThe number of structs to read.
fileEndianThe endianness of the data.

Returns

A dynamic array containing the read structs.

Throws

Exception if offset is out of bounds or not enough data to read.