#bitset #fixed-size #stack #small

tinybitset

Generic implementation of small, fixed size, copyable bitsets

1 unstable release

0.0.1 Dec 15, 2023

#34 in #small

Download history 25/week @ 2023-12-22 74/week @ 2023-12-29 86/week @ 2024-01-05 274/week @ 2024-01-12 202/week @ 2024-01-19 101/week @ 2024-01-26 89/week @ 2024-02-02 68/week @ 2024-02-09 53/week @ 2024-02-16 81/week @ 2024-02-23 104/week @ 2024-03-01 62/week @ 2024-03-08 60/week @ 2024-03-15 40/week @ 2024-03-22 71/week @ 2024-03-29 17/week @ 2024-04-05

203 downloads per month

MIT/Apache

33KB
695 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

~155KB