ToLEBytes method
Serialises length words starting at ptr to a flat little-endian byte list.
Each word is split into byteSize bytes, least-significant byte first.
Implementation
L ToLEBytes(S ptr, int length) =>
fromList(asDartList(ptr, length).expand((word) =>
.generate(byteSize, (i) => (word.toInt() >> (i * 8)) & 0xFF)
));