lzfse_rust 0.1.0

A pure Rust LZFSE library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::ops::Len;

/// BitReader source. Lazy underflow state management. 8 byte padded (undefined).
pub trait BitSrc: Len {
    /// Pops bytes, as little-endian `usize` packed to the right with any unused bytes undefined.
    /// Usage before initialization undefined not unsafe.
    ///
    /// `n_bytes < size_of::<usize>()`
    unsafe fn pop_bytes(&mut self, n_bytes: usize) -> usize;

    /// Initialize and pop `size_of::<usize> - 1` bytes with unused bytes set to zero.
    fn init_1(&mut self) -> usize;

    /// Initialize and pop `size_of::<usize>` bytes.
    fn init_0(&mut self) -> usize;
}