Do we have a way to share a "read-only" view of a memory backed RoaringBitmap?
Expectations:
- all calls should be backed by an underlying bitmap
- any calls that modify the bitmap throw a documented exception
Usecase:
I have a RoaringBitmap that needs to be move around throughout the codebase for operations that aren't expected to modify it.
Modifications should only happen by a holder object based on some internal logic.
A way to enforce this "read-only" behaviour by design and without any unnecessary object allocs/copies whenever the bitmap is asked for will make it easier to catch implementation bugs while keeping same performance.
Happy to contribute!
Regards,
Shikhar