datrs / random-access-storage

Abstract interface to implement random-access instances.
Apache License 2.0
14 stars 7 forks source link

read() without allocating a buffer #13

Open ghost opened 5 years ago

ghost commented 5 years ago

The Read trait from core and implemented by File defines a read() method that accepts a mutable buffer as an argument, which avoids performing unnecessary memory allocations. Does it make sense to have the random access storage ecosystem also use this pattern?