quadrank 0.2.0

Fast rank over binary and size-4 DNA alphabets.
Documentation
use sucds::{Serializable, bit_vectors::Rank};

pub use sucds::bit_vectors::Rank9Sel;

impl crate::binary::BiRanker for Rank9Sel {
    fn new_packed(seq: &[u64]) -> Self {
        Self::from_bits(
            seq.iter()
                .flat_map(|x| (0..64).map(move |i| (x >> i) & 1 == 1)),
        )
    }

    fn size(&self) -> usize {
        self.size_in_bytes()
    }

    unsafe fn rank_unchecked(&self, pos: usize) -> u64 {
        self.rank1(pos).unwrap() as u64
    }
}