Skip to main content

check_fastcover_options

Function check_fastcover_options 

Source
pub fn check_fastcover_options(
    options: &FastCoverOptions,
    dict_size: usize,
) -> Result<()>
Available on crate feature dict-builder only.
Expand description

check_cover_options for FastCOVER: also refuses f, accel and a d below 4 as train_fastcover_dict and optimize_fastcover_dict do.

§Errors

As check_cover_options.

§Examples

use structured_zstd::dictionary::{CoverOptions, FastCoverOptions, check_fastcover_options};

let options = FastCoverOptions {
    cover: CoverOptions { k: 256, d: 8, ..FastCoverOptions::default().cover },
    ..FastCoverOptions::default()
};
assert!(check_fastcover_options(&options, 4096).is_ok());
assert!(check_fastcover_options(&options, 128).is_err());