Skip to main content

decide_on_sample

Function decide_on_sample 

Source
pub fn decide_on_sample(sample: &[u8], o: &CodecOptions) -> Result<Decision>
Expand description

Decide filter and codec for a block on its sample (sample() of the block; efforts 2..=4). The same heuristics and codecs as the full trial run on the sample, in the same order, and the candidate the full trial would have kept on the sample wins. looks_like_text is judged on the (filtered) sample here, not on the first 64 KiB of the block as in the full trial: a strided sample represents a mixed block better; this is intended.