#array #memory #integer

intarray

memory efficient integer array

1 unstable release

0.1.0 Sep 6, 2019

#350 in #integer

Custom license

34KB
961 lines

Memory Efficient Integer Array

Usage

Cargo.toml

[dependencies]
intarray = "0.1.0"
use intarray;

let mut v = intarray::IntArray::new(7, 999);  // 7-bit unsigned integer, 999 entries
v.set(10, 20).unwrap();                       // v[10] = 20
v.get(10).unwrap();                           // get v[10]

Dependencies

~4–12MB
~138K SLoC