pub mod adaptive_huff;
pub mod lzhuf;
pub mod node_pool;
pub mod ring_buffer;
type DYNERR = Box<dyn std::error::Error>;
#[derive(thiserror::Error, Debug)]
#[allow(unused)]
pub enum Error {
#[error("file format mismatch")]
FileFormatMismatch,
#[error("file too large")]
FileTooLarge,
#[error("checksum failed")]
BadChecksum,
}
#[derive(Clone)]
pub struct Options {
header: bool,
in_offset: u64,
out_offset: u64,
window_size: usize,
threshold: usize,
lookahead: usize,
precursor: u8,
}
#[allow(unused)]
pub const STD_OPTIONS: Options = Options {
header: true,
in_offset: 0,
out_offset: 0,
window_size: 4096,
threshold: 2,
lookahead: 60,
precursor: b' ',
};
pub const TD0_READ_OPTIONS: Options = Options {
header: false,
in_offset: 12,
out_offset: 0,
window_size: 4096,
threshold: 2,
lookahead: 60,
precursor: b' ',
};
pub use lzhuf::expand;