bit-buf 0.1.0

I needed this.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{BitBuf, Storage};

impl<S: Storage> BitBuf<S> {
  /// Read a BE-bit-order [`u8`] from `byte_offset` without performing any bound checks
  ///
  /// # Safety
  ///
  /// This is UB if `byte_offset >= len(storage)`
  #[inline(always)]
  pub unsafe fn read_u8_be_aligned_full_at_unchecked(&self, byte_offset: usize) -> u8 {
    *unsafe { self.bytes().get_unchecked(byte_offset) }
  }
}