srounet / Pymem

A python library for windows, providing the needed functions to start working on your own with memory editing.
MIT License
306 stars 44 forks source link

Improve read and write speeds by removing buffer copys #102

Closed StarrFox closed 1 year ago

StarrFox commented 1 year ago

This pull request implements the proposed changes in #101 by adding the new memory.read/write_ctype functions and updating the previous read and write methods to use these new functions

you can see some of the observed speed improvements in the original issue

as a byproduct the new ctype based functions can also read ctype.Structures

I added a new test for this functionality and all previous tests seem to pass with the new read/write method

qb-0 commented 1 year ago

Thank you for this improvments. I read the issue, i did not knew this was possible, verry nice additions. Thank you for tests, documentation and coverage.

I let you merge and release, it's all good for me.

Great news. I've told StarrFox already that I would like to replace my AssaultCube Example in the Docs with https://github.com/qb-0/Pymem-ACESP if possible. It's a lot more performant and cleaner.