readValue
fn
T readValue(T)(const(ubyte)[] data, size_t offset, ElfEndian fileEndian) if (isIntegral!T)Read a value from a byte array at a specified offset.
This template function reads an integral value from a byte array, handling endianness conversion as needed.
Parameters
data | The byte array to read from. |
offset | The offset in bytes to start reading from. |
fileEndian | The endianness of the data. |
Returns
The read value converted to native endianness.
Throws
Exception if offset is out of bounds or not enough data to read.