Function q_compress::auto_compress

source ·
pub fn auto_compress<T: NumberLike>(
    nums: &[T],
    compression_level: usize
) -> Vec<u8>
Expand description

Automatically makes an educated guess for the best compression configuration, based on nums and compression_level, then compresses the numbers to .qco bytes.

This adds some compute cost by trying different configurations on a subset of the numbers to determine the most likely one to do well. If you know what configuration you want ahead of time (namely delta encoding order), you can use Compressor::from_config instead to spare the compute cost. See CompressorConfig for information about compression levels.