Skip to content

BitArray from int array and binary #16

Description

@l0rinc

Since we can export easily to an int array, we should be able to import it as well, i.e.:

  var bits = BitArray(history.keys.max)..setBits(setKeys); // would be nice to have a direct constructor for this as `BitArray(setKeys)`
  var ints = bits.asUint32Iterable().toList();

  expect(BitArray.parseInts(ints), bits);

This should be better optimized than #4.
Even better solution could be to serialize/deserialize from binary string representation - I need this BitArray for optimized storage in the first place.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions