Closed a-usr closed 9 months ago
I am asking because IMO calling read_byte() for every byte i want to read takes way too long
It is best to avoid DataReader
and use Python APIs like the struct
module instead. Buffer
objects can be passed directly to anything in Python that uses the Python buffer protocol. So return bytearray(buffer)
would probably do what you want in this case.
Say have a DataReader set up from a buffer. And i want to read all bytes at once. so i feed the data reader an empty winsdk.system.array("B"). I know the buffer isnt empty. However it appears that read_bytes does not write to the array. Am I doing something wrong?