Skip to main content

decide

Function decide 

Source
pub fn decide(
    context: CompressionContext<'_>,
    candidates: &[CompressionCandidate],
) -> CompressionDecision
Expand description

Compare candidates using all provider input token classes affected here.

gross_benefit prices removed tokens once as cache_write, then as cache_read on every predicted reuse. cache_break_risk prices the remaining compressed prefix at the write-minus-read premium on each reuse, weighted by the measured probability that the prefix changes.