dolphin
dolphin copied to clipboard
Support for python's Buffer protocol
The save-stating and screenshotting methods should be able to read from and write to any python object that exposes a buffer.
Writing the data directly into a buffer will greatly increase performance, because you won't have to allocate memory for a bytes object, nor will you have to copy the data twice.
The buffer protocol was made an official protocol as of python 3.11, and all major array-like objects support it (including bytes, bytearray, array.array, numpy.array, etc).