-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: accept memoryview besides bytes #9
Comments
There should already be support for |
Strange, I'll investigate tomorrow why I got these failures. |
Please do. I'll be curious to see the error messages. In the meantime, I've pushed b69d1ba to add a small comment about this to the readme example. |
As part of this, refactor hash_bytes_using_buffer_api() to use PyBuffer::as_slice, so that we don't need to check for contiguity ourselves. Fixes #9.
This auto closed because of my commit message, but I do want to test it. The easiest way to import the local build is to do:
I've checked that |
Hi,
thanks for this library, I was looking for something like blake3, so when I found it and found out there was a Python binding, that made me very happy :).
I was wondering if it would be simple to support memoryview instead of bytes. You can get a memoryview on a bytes object, so that would allow for less memory copies if I am not mistaken. Having a memoryview, and converting it to a bytes object (
mv.tobytes()
) does seem to do a memory copy.Regards,
Maarten
The text was updated successfully, but these errors were encountered: