Skip to content

Simple vector of bits aligned inside a vector of bytes

Notifications You must be signed in to change notification settings

mberehulka/bitvec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BitVec

Simple vector of bits aligned inside a vector of u8, u16, u32, u64 or u128.

Bits are aligned in little endian order.

Example:

let mut v = super::BitVec::<u64>::new(); // []
v.resize(128); // [0u64, 0u64]
v.set(127, true); // [0u64, 1u32]
println!("{:#?}", v);
assert!(v.get(127) == true);