meilisearch / grenad

Tools to sort, merge, write, and read immutable key-value pairs :tomato:
https://docs.rs/grenad
MIT License
25 stars 3 forks source link

Introduce methods to get the underlying reader by reference #22

Closed Kerollmops closed 3 years ago

Kerollmops commented 3 years ago

This PR introduces the Reader::get_ref and ReaderCursor::get_ref methods to get the underlying reader R by reference. It can be used when the underlying reader is a file and you would like to memory map it.