mod builder;
mod iterator;
mod posting_list;
#[cfg(test)]
mod tests;
mod value_handler;
mod view;
mod visitor;
use bitpacking::BitPacker;
type BitPackerImpl = bitpacking::BitPacker4x;
pub const CHUNK_LEN: usize = 128;
const _: () = assert!(128 == BitPackerImpl::BLOCK_LEN);
pub trait SizedValue: Sized + Copy + std::fmt::Debug {}
impl SizedValue for () {}
impl SizedValue for u32 {}
impl SizedValue for u64 {}
pub trait UnsizedValue {
fn write_len(&self) -> usize;
fn write_to(&self, dst: &mut [u8]);
fn from_bytes(data: &[u8]) -> Self;
}
pub type SizedTypeFor<V> = <<V as PostingValue>::Handler as ValueHandler>::Sized;
pub type IdsPostingList = PostingList<()>;
pub use builder::PostingBuilder;
pub use iterator::PostingIterator;
pub use posting_list::{PostingChunk, PostingElement, PostingList, RemainderPosting};
pub use value_handler::{PostingValue, SizedHandler, UnsizedHandler, ValueHandler};
pub use view::{PostingListComponents, PostingListView};
pub use visitor::PostingVisitor;