sparse-bitfield

Crates.iosparse-bitfield
lib.rssparse-bitfield
version0.11.0
sourcesrc
created_at2018-03-29 21:26:27.665925
updated_at2020-02-19 19:00:01.138849
descriptionBitfield that allocates a series of small buffers
homepage
repositoryhttps://github.com/datrs/sparse-bitfield
max_upload_size
id58128
size39,349
Maintainers (github:datrs:maintainers)

documentation

https://docs.rs/sparse-bitfield

README

sparse-bitfield

crates.io version build status downloads docs.rs docs

Bitfield that allocates a series of small buffers. Adapted from mafintosh/sparse-bitfield.

Usage

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));

Installation

$ cargo add sparse-bitfield

License

MIT OR Apache-2.0

Commit count: 77

cargo fmt