[][src]Enum zstd_safe::CParameter

pub enum CParameter {
    Format(FrameFormat),
    CompressionLevel(i32),
    WindowLog(u32),
    HashLog(u32),
    ChainLog(u32),
    SearchLog(u32),
    MinMatch(u32),
    TargetLength(u32),
    ContentSizeFlag(bool),
    ChecksumFlag(bool),
    DictIdFlag(bool),
}

Variants

Format(FrameFormat)

See FrameFormat.

CompressionLevel(i32)

Update all compression parameters according to pre-defined cLevel table.

Default level is ZSTD_CLEVEL_DEFAULT==3.

Special: value 0 means "do not change cLevel".

WindowLog(u32)

Maximum allowed back-reference distance, expressed as power of 2.

Must be clamped between ZSTD_WINDOWLOG_MIN and ZSTD_WINDOWLOG_MAX.

Special: value 0 means "do not change windowLog".

Note: Using a window size greater than ZSTD_MAXWINDOWSIZE_DEFAULT (default: 2^27) requires setting the maximum window size at least as large during decompression.

HashLog(u32)

Size of the probe table, as a power of 2.

Resulting table size is (1 << (hashLog+2)). Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.

Larger tables improve compression ratio of strategies <= dFast, and improve speed of strategies > dFast.

Special: value 0 means "do not change hashLog".

ChainLog(u32)

Size of the full-search table, as a power of 2.

Resulting table size is (1 << (chainLog+2)). Larger tables result in better and slower compression. This parameter is useless when using "fast" strategy.

Special: value 0 means "do not change chainLog".

SearchLog(u32)

Number of search attempts, as a power of 2.

More attempts result in better and slower compression. This parameter is useless when using "fast" and "dFast" strategies.

Special: value 0 means "do not change searchLog".

MinMatch(u32)

Minimum size of searched matches (note : repCode matches can be smaller).

Larger values make faster compression and decompression, but decrease ratio. Must be clamped between ZSTD_SEARCHLENGTH_MIN and ZSTD_SEARCHLENGTH_MAX.

Note that currently, for all strategies < btopt, effective minimum is 4.

Note that currently, for all strategies > fast, effective maximum is 6.

Special: value 0 means "do not change minMatchLength".

TargetLength(u32)

Only useful for strategies >= btopt.

Length of Match considered "good enough" to stop search. Larger values make compression stronger and slower.

Special: value 0 means "do not change targetLength".

ContentSizeFlag(bool)

Content size will be written into frame header whenever known (default:1)

Content size must be known at the beginning of compression, it is provided using ZSTD_CCtx_setPledgedSrcSize()

ChecksumFlag(bool)

A 32-bits checksum of content is written at end of frame (default:0)

DictIdFlag(bool)

When applicable, dictionary's ID is written into frame header (default:1)

Trait Implementations

impl Copy for CParameter[src]

impl Debug for CParameter[src]

impl PartialEq<CParameter> for CParameter[src]

impl Eq for CParameter[src]

impl Clone for CParameter[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for CParameter

impl Sync for CParameter

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]