laz-rs / laz-rs-python

Python bindings for laz-rs
MIT License
10 stars 4 forks source link

Avoid too many copies #8

Closed tmontaigu closed 3 years ago

tmontaigu commented 3 years ago

Use memoryviews + readinto when reading if possible, else fallback to the previous way.

When writing use memoryview to avoid temporarly copying the slice to bytes before calling python's write