Skip to main content

CMConfig

Struct CMConfig 

Source
pub struct CMConfig {
Show 16 fields pub order1_size: usize, pub order2_size: usize, pub order3_size: usize, pub order4_size: usize, pub order5_size: usize, pub order6_size: usize, pub order7_size: usize, pub order8_size: usize, pub order9_size: usize, pub match_ring_size: usize, pub match_hash_size: usize, pub word_size: usize, pub sparse_size: usize, pub run_size: usize, pub json_size: usize, pub ppm_config: PpmConfig,
}
Expand description

Configuration for the CM engine – controls memory/quality trade-off.

Each field specifies the ContextMap size in bytes for the corresponding model. Larger sizes reduce hash collisions and improve prediction accuracy at the cost of more memory and slightly slower cache performance.

Fields§

§order1_size: usize

Order-1 ContextMap size (default: 32MB).

§order2_size: usize

Order-2 ContextMap size (default: 16MB).

§order3_size: usize

Order-3 ChecksumContextMap size (default: 32MB).

§order4_size: usize

Order-4 ChecksumContextMap size (default: 32MB).

§order5_size: usize

Order-5 AssociativeContextMap size (default: 32MB).

§order6_size: usize

Order-6 AssociativeContextMap size (default: 16MB).

§order7_size: usize

Order-7 AssociativeContextMap size (default: 32MB).

§order8_size: usize

Order-8 AssociativeContextMap size (default: 32MB).

§order9_size: usize

Order-9 AssociativeContextMap size (default: 16MB).

§match_ring_size: usize

Match model ring buffer size in bytes (default: 16MB). Must be power of 2.

§match_hash_size: usize

Match model hash table entry count (default: 8M). Must be power of 2.

§word_size: usize

Word model ContextMap size (default: 16MB).

§sparse_size: usize

Sparse model ContextMap size per gap context (default: 8MB, 16MB total).

§run_size: usize

Run model ContextMap size (default: 4MB).

§json_size: usize

JSON model ContextMap size (default: 8MB).

§ppm_config: PpmConfig

PPM model table sizes configuration.

Implementations§

Source§

impl CMConfig

Source

pub fn balanced() -> Self

Balanced preset: production sizes (~256MB CM + ~360MB PPM).

Source

pub fn max() -> Self

Max preset: 2x everything for better compression (~512MB CM + ~360MB PPM). Doubles all ContextMap sizes, match ring, and hash table. More context slots = fewer collisions = better predictions.

Trait Implementations§

Source§

impl Clone for CMConfig

Source§

fn clone(&self) -> CMConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CMConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.