Skip to main content

create_codec

Function create_codec 

Source
pub fn create_codec(
    codec_id: &str,
    dim: usize,
    fib_config: Option<&FibConfig>,
    turbo_config: Option<&TurboConfig>,
) -> Result<Box<dyn KVecCodec>>
Expand description

Create a codec from a policy and vector dimension.

Returns the appropriate codec based on the codec_id in the policy. If the required compression crate is unavailable, returns an error.