bitvec
bitvec copied to clipboard
A crate for managing memory bit by bit
BitVec is very convenient for protocol data and processing bit-oriented encodings. For cryptographic applications it would be nice if it implemented the [`Zeroize`](https://docs.rs/zeroize/latest/zeroize/trait.Zeroize.html) trait for clearing key material from memory...
`bitvec` can be effectively used in protocols for compact storing flags and it sounds reasonable to me, to use `bytemuck` in the same context. Consider something like this struct for...
Using current `main` branch, using the following code panics: ```rust let b = bits![usize, Msb0; 0]; println!("{:?}", b.last_one()); ``` ``` thread 'main' panicked at 'attempt to subtract with overflow', /Users/zach/.cargo/git/checkouts/bitvec-d0c4461fa4fde381/7d31e86/src/slice/specialization/msb0.rs:178:21...
The `unsafe`-free code below creates two `&mut` references to the same buffer at the same time, despite claim of the contrary in https://github.com/bitvecto-rs/bitvec/blob/main/book/data-structures/bitslice.md#macro-constructor. Multiple calls to a function accessing a...
In this example, the generated code calls into `BitSliceIndex::index` and into `BitField::load_le`: ```rust use bitvec::prelude::*; fn extract_24(val: u32) -> u32 { let bv: BitArray = BitArray::new(val); bv[8..32].load_le() } ``` Both...
Currently, code like the following don't work: ```rust use bitvec::prelude::*; use rayon::prelude::*; use std::sync::atomic::AtomicUsize; fn main() { let mut list = bitvec![Lsb0, AtomicUsize; 0; 100]; list.par_iter_mut().step_by(2).for_each(|mut bit| { *bit =...
Currently `bitvec` has a slice, a box, and a vector, but it does not have reference-counted boxes. I would like to export `BitArc` and `BitRc` types which, like `BitBox`, use...
Hi! Recently I tried to introduce a new dependency into a project I'm working on and encountered this issue: https://github.com/bitvecto-rs/bitvec/issues/105 Unfortunately I didn't find a way to solve this dependency...
As `0.18` versions prior to `0.18.5` have a lock on the major version on `funty` they cannot be in the same project as versions depending on `funty ~1.2`, as `funty...
``` error[E0277]: the trait bound `&array::BitArray: From` is not satisfied --> src/array/traits.rs:417:13 | 417 | (&*bits).try_into(); | ^^^^^^^^ the trait `From` is not implemented for `&array::BitArray` | = help: the...