2 unstable releases
0.2.0 | Oct 29, 2020 |
---|---|
0.1.0 | Oct 25, 2020 |
#1855 in Data structures
36KB
417 lines
Growable bitmap
growable-bitmap
is a Rust crate providing a growable (and shrinkable) compact
boolean array that can be parameterized on its storage type.
THIS CRATE IS NOT CONSIDERED PRODUCTION READY AT THE MOMENT.
TODO
This crate is not feature-complete at all. Below are some features I want
to add before marking it as 1.0
:
-
BitOr
(with anotherGrowableBitMap
). -
BitOrAssign
(with anotherGrowableBitMap
). -
BitAnd
(with anotherGrowableBitMap
). -
BitAndAssign
(with anotherGrowableBitMap
). -
BitXor
(with anotherGrowableBitMap
). -
BitXorAssign
(with anotherGrowableBitMap
). -
When
const-generics
become available, possibly use them as storage ? -
[Rust 1.48.0+ / Intra-doc links]: Use intra-doc links in documentation. Right now there are no links because they're painful to write once you've been introduced to the wonder intra-doc links are.
Usage
Add this to your Cargo.toml
:
[dependencies]
growable-bitmap = "0.2"
and, if you're using Rust Edition 2015, this to your crate root:
extern crate growable_bitmap;
Similar crates
But bitmaps are not a new problem, why a new crate ?
This is true, in fact there are two libraries on crates.io
that provides
bitmaps already:
bitmap
: marked as complete since 2016, which means it does not leverage new APIs in the standard library. Not a bad thing if you want absolute stability though.bitmaps
: Only fixed-size arrays, which is an explicit non-goal ofgrowable-bitmap
.bitmaps
andgrowable-bitmap
complement each other and you should choose the correct one for you usage.
And I wanted to make a bitmap crate because I think bitmaps are a very cool data structure and I love using Rust to build things.
License
See the LICENSE
file at the root of the repository.