Should be an easy one.
I'm working on Scala trying to handle long sequences of binary data. That is long lists of 0's and 1's. What is the 'best' way to store/access this kind of data.
The important point here is memory optimisation, so I would like to avoid using an entire byte to store a boolean. Also access is somwhat important, so I would like to avoid paking them into bytes and then into arrays.
Is a BitMap a good idea? Is there such a class in scala?
if not, would it be best to use ByteArray? How would you implement this?
Any other ideas?
Thanks,