#![allow(dead_code)]
mod built {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
}
pub const DEFAULT_BLOCK_SIZE: usize = 4096;
pub(crate) const DEFAULT_ENTROPY_ESTIMATOR_PARTITIONS: usize = 16;
pub const MIN_BITS_PER_SAMPLE: usize = 8;
pub const MIN_BLOCK_SIZE: usize = 32;
pub(crate) const MIN_BLOCK_SIZE_FOR_PREDICTION: usize = 64;
pub const MAX_BITS_PER_SAMPLE: usize = 24;
pub const MAX_BLOCK_SIZE: usize = 32767;
pub const MAX_CHANNELS: usize = 8;
pub(crate) const MAX_ENTROPY_ESTIMATOR_PARTITIONS: usize = 64;
pub mod build_info {
use super::built;
pub static BUILD_PROFILE: &str = built::PROFILE;
pub static CRATE_VERSION: &str = built::PKG_VERSION;
pub static FEATURES: &str = built::FEATURES_LOWERCASE_STR;
pub static RUSTC_VERSION: &str = built::RUSTC_VERSION;
}
pub(crate) mod envvar_key {
pub const DEFAULT_PARALLELISM: &str = "FLACENC_WORKERS";
}
pub mod fixed {
pub const MAX_LPC_ORDER: usize = 4;
}
pub mod par {
pub const FRAMEBUF_MULTIPLICITY: usize = 2;
}
pub mod qlpc {
pub const DEFAULT_ORDER: usize = 10;
pub const DEFAULT_PRECISION: usize = 15;
pub const DEFAULT_TUKEY_ALPHA: f32 = 0.4;
pub const MAX_ORDER: usize = 24;
pub const MAX_PRECISION: usize = 15;
pub const MAX_SHIFT: i8 = (1i8 << (SHIFT_BITS - 1)) - 1;
pub const MIN_SHIFT: i8 = 0;
pub const SHIFT_BITS: usize = 5;
}
pub mod rice {
pub const MAX_RICE_PARAMETER: usize = 14;
pub const MAX_PARTITION_ORDER: usize = 15;
pub const MAX_PARTITIONS: usize = 1usize << MAX_PARTITION_ORDER;
pub const MIN_PARTITION_SIZE: usize = 64;
}
pub(crate) mod panic_msg {
pub const ARC_DESTRUCT_FAILED: &str = "INTERNAL ERROR: Arc destruction failed.";
pub const DATA_INCONSISTENT: &str = "INTERNAL ERROR: Internal variable inconsistency detected.";
pub const ERROR_NOT_EXPECTED: &str =
"INTERNAL ERROR: Error occured in the function where it is not expected.";
pub const FRAMENUM_NOT_SET: &str =
"INTERNAL ERROR: Frame buffer is not properly initialized. (FrameNo. not set).";
pub const MPMC_SEND_FAILED: &str =
"INTERNAL ERROR: Critical error occured in multi-thread communication channel.";
pub const MPMC_RECV_FAILED: &str =
"INTERNAL ERROR: Critical error occured in multi-thread communication channel.";
pub const MUTEX_LOCK_FAILED: &str = "INTERNAL ERROR: Couldn't get lock for mutex.";
pub const MUTEX_DROP_FAILED: &str = "INTERNAL ERROR: Couldn't discard mutex.";
pub const NO_ERROR_EXPECTED: &str =
"INTERNAL ERROR: Error emitted from the function designed not to return err.";
pub const THREAD_JOIN_FAILED: &str = "INTERNAL ERROR: Failed to wait thread termination.";
}