lzfse_rust 0.1.0

A pure Rust LZFSE library.
Documentation
use crate::ops::Len;

use super::BitSrc;
use super::ByteBits;

pub trait AsBitSrc: Len {
    type BitSrc: BitSrc;

    /// `self.len()` minimum of 8 bytes.
    fn as_bit_src(&self) -> Self::BitSrc;
}

impl<'a> AsBitSrc for &'a [u8] {
    type BitSrc = ByteBits<'a>;

    #[inline(always)]
    fn as_bit_src(&self) -> Self::BitSrc {
        ByteBits::new(self)
    }
}