#bitset #fixed-size #stack #small

tinybitset

Generic implementation of small, fixed size, copyable bitsets

2 releases

0.0.2 Oct 9, 2024
0.0.1 Dec 15, 2023

#1178 in Data structures

Download history 9/week @ 2024-08-17 19/week @ 2024-08-24 77/week @ 2024-08-31 64/week @ 2024-09-07 39/week @ 2024-09-14 85/week @ 2024-09-21 88/week @ 2024-09-28 234/week @ 2024-10-05 43/week @ 2024-10-12 31/week @ 2024-10-19 25/week @ 2024-10-26 31/week @ 2024-11-02 86/week @ 2024-11-09 87/week @ 2024-11-16 80/week @ 2024-11-23 61/week @ 2024-11-30

319 downloads per month

MIT/Apache

35KB
727 lines

tinybitset

This crate provides a small, fixed size bitset type that stores its data inline rather than on the heap. It uses const generics to have a single type that is generic over the size and the underlying storage type.

While the crate supports bitsets of any size, it is best used for cases where the data is small enough to be cheaply copyable. For bitsets using over 256 bits a heap-allocated implementation such as the one provided by fixedbitset might be more suitable.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~150KB