Function size_estimate

Source
pub fn size_estimate(params: SizeEstimationParameters<'_>) -> usize
Expand description

Estimate size of a compressed data based on precalculated LZ matches and entropy

§Arguments

  • params - SizeEstimationParameters containing:
    • data_len - The uncompressed data length
    • num_lz_matches - The number of LZ matches
    • entropy - The estimated entropy of the data
    • lz_match_multiplier - Multiplier for LZ matches
    • entropy_multiplier - Multiplier for entropy

§Returns

This is a rough estimation based on very limited testing on DXT1, only, you’ll want to replace this function with something more suitable for your use case, possibly.