#bit-array #naive

bitarray-naive

The simple and naive rust implementation of a bitarray

3 releases

0.1.2 Dec 25, 2022
0.1.1 Dec 25, 2022
0.1.0 Dec 25, 2022

#8 in #bit-array


Used in bfilters

Custom license

10KB
148 lines

bitarray

The simple and naive rust implementation of a bit array.

Install

[dependencies]
...
bitarray-naive = { git = "https://github.com/obakhmach/bitarray", branch = "<desired-branch>", version = "<desired-version>"}

For example for dev branch with version 0.1.0 the dependecy will look the following.

[dependencies]
...
bitarray-naive = { git = "https://github.com/obakhmach/bitarray", branch = "dev", version = "0.1.0"}

Or as a registered create

[dependencies]
...
bitarray-naive = "0.1.0"

Usage

use bitarray_naive::BitArray;

let bitarray_size: i64 = 9999;

let mut bitarray: BitArray = BitArray::new(bitarray_size);

bitarray.set(12, true).unwrap();

let bitarray_value: bool = bitarray.get(12).unwrap();

Dependencies

~0.3–0.9MB
~20K SLoC