I have UInt8 data array which I got from TCPSocket.
I want to read UInt32s and UInt16s from different indices.
For example:
data = UInt8[0xFF, 0x00, 0x00, 0x00, 0xAA, 0x00]
// Something like this:
extracted_UInt32 = data.readUInt32(1) # [1-4]
extracted_UInt16 = data.readUInt16(5) # [5-6]
It is exactly like Node.js's Buffer.readUInt16LE(offset): https://nodejs.org/api/buffer.html#buffer_buf_readint16le_offset
Thanks!