pub mod consts;
pub mod decode;
pub mod encode;
pub mod halfvec;
pub mod queue;
pub use decode::*;
pub use encode::*;
pub use queue::*;
#[derive(Debug)]
pub enum CodingError {
Empty,
NotEnoughBits,
InvalidBits,
InvalidInitialColumnTag,
InvalidColumnTag,
ColumnLengthMismatch(ColumnLengths),
InvalidRowCount(usize),
}
#[derive(Debug)]
pub struct ColumnLengths {
pub expected_rows: usize,
pub column_lengths: ::alloc::vec::Vec<usize>,
}
pub trait TszCompressV2 {
type T: Copy;
fn new(prealloc_rows: usize) -> Self;
fn compress(&mut self, row: Self::T);
fn len(&self) -> usize;
fn is_empty(&self) -> bool {
self.len() == 0
}
fn bit_rate(&self) -> usize;
fn row_count(&self) -> usize;
fn finish_into(&mut self, output_bytes: &mut ::alloc::vec::Vec<u8>);
fn finish(&mut self) -> ::alloc::vec::Vec<u8> {
let mut bytes = ::alloc::vec::Vec::new();
self.finish_into(&mut bytes);
bytes
}
}
pub trait TszDecompressV2 {
type T: Copy;
fn new() -> Self;
fn decompress(&mut self, bits: &[u8]) -> Result<(), CodingError>;
fn rows(&self) -> ::alloc::vec::Vec<Self::T>;
}