1 unstable release

0.1.0 Aug 5, 2022

#74 in #bitmap

Download history 18/week @ 2024-02-25 3/week @ 2024-03-03 4/week @ 2024-03-10 4/week @ 2024-03-17 1/week @ 2024-03-24 26/week @ 2024-03-31 1/week @ 2024-04-07 23/week @ 2024-04-14

52 downloads per month
Used in frangipani

MIT license

5KB
90 lines

Var Bitmap

A simple variable-sized bitmap.

Motivation

Most of the bitmap implementation I found on crates.io are either fixed-size or compressed which isn't what I needed for my project. I want a growable bitmap that is expected to remain small. A compressed bitmap adds a lot of additional data structures on top of the bitmap itself which works great for large bitmap but adds a lot of unnecessary complexity for bitmap that is expected to remain small.

Usage

use var_bitmap::Bitmap;

let bm = Bitmap::new();
bm.push(false);
bm.push(true);
bm.push(false);
bm.get(2); // Should be false
bm.set(2, true);
bm.get(2); // Should be true

No runtime deps