You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: accept any buffer instance when processing file data (#148)
- Change _get_file_details() to return Buffer instead of bytes
- Add special handling for memoryview inputs to avoid unnecessary conversion
- Support all buffer protocol objects (bytes, bytearray, memoryview, array.array, etc.)
- Update type annotations throughout to use Buffer type from typing_extensions
- Improve error messages to mention "data buffer" instead of just "bytes"
This change reduces memory overhead when working with buffer protocol objects
by preserving memoryview objects instead of converting them to bytes unnecessarily.
Closes#46
Co-authored-by: Alyssa Coghlan <[email protected]>
0 commit comments