bitcram 0.3.0

A small, derive-based bit packing library for compact integer representations
Documentation
1
2
3
4
5
6
use crate::Buffer;

pub(crate) fn mask<B: Buffer>(size: u32) -> B {
    debug_assert!(size <= B::BITS);
    B::MAX >> (B::BITS - size)
}