onecodex / mmap-bitvec

Rust implementation of a mmap-based bit vector
MIT License
6 stars 0 forks source link

Read-only support #10

Open bovee opened 5 years ago

bovee commented 5 years ago

We need some way to support opening a bit-vector in read-only fashion. We had a readonly parameter on MmapBitVec::open at one point, but this doesn't work any more because upstream memmap split their base struct into mutable and non-mutable variants without a common trait to unify them (and passing a file created with OpenOptions::new()...write(false)... to a MmapMut initializer doesn't work either).

There are a few possible ways to do this: