| Crates.io | sparse-bitfield |
| lib.rs | sparse-bitfield |
| version | 0.11.0 |
| created_at | 2018-03-29 21:26:27.665925+00 |
| updated_at | 2020-02-19 19:00:01.138849+00 |
| description | Bitfield that allocates a series of small buffers |
| homepage | |
| repository | https://github.com/datrs/sparse-bitfield |
| max_upload_size | |
| id | 58128 |
| size | 39,349 |
Bitfield that allocates a series of small buffers. Adapted from mafintosh/sparse-bitfield.
extern crate sparse_bitfield;
use sparse_bitfield::Bitfield;
let mut bits = Bitfield::new(1024);
bits.set(0, true); // set first bit
bits.set(1, true); // set second bit
bits.set(1_000_000, true); // set the millionth bit
assert!(bits.get(1));
$ cargo add sparse-bitfield
MIT OR Apache-2.0