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
refactor: optimize file handling to avoid redundant buffer conversions
- 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 "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.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments