pub const MAX_CLASS_COUNT: u32 = 9_999;
Largest class count the encoding supports. Misc drops |p| <= 1e-4, so the smallest encoded class 1 / class_count must stay above that cutoff.
|p| <= 1e-4
1 / class_count