Skip to content

Commit

Permalink
minimum acc_log is 5
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Oct 13, 2024
1 parent e391414 commit 280e790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fse/fse_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn build_table_from_counts(counts: &[usize]) -> FSETable {
let sum = probs.iter().sum::<i32>();
assert!(sum > 0);
let sum = sum as usize;
let acc_log = sum.ilog2() as u8 + 1;
let acc_log = (sum.ilog2() as u8 + 1).max(5);
assert!(acc_log < 22); // TODO implement logic to decrease some counts until this fits

// just raise the maximum probability as much as possible
Expand Down

0 comments on commit 280e790

Please sign in to comment.