fn readIntSliceForeign(comptime T: type, bytes: []const u8) T

Asserts that bytes.len >= @typeInfo(T).Int.bits / 8. Reads the integer starting from index 0 and ignores extra bytes. The bit count of T must be evenly divisible by 8. Assumes the endianness of memory is foreign, so it must byte-swap.

Parameters

T: type,
bytes: []const u8,