Vec<u2>, Vec<u4>?

We have packed Vec<u128>, Vec<u64>, Vec<u32>, Vec<u16>, Vec<u8>.

We also have 'packed" Vec<u1> via bitvec - Rust

Are there builtins for 'packed' Vec<u2>, Vec<u4> ?

No, this would need to be in a specialized crate similar to bitvec. I'm not aware of an existing crate for this.

1 Like

After some more searching, I found a few crates for handling packed slices of u4 values:

5 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.