Skip to content

Commit

Permalink
inflate/constants: Bump OFFSET_ENOUGH and clarify reason for bump
Browse files Browse the repository at this point in the history
Signed-off-by: caleb <etemesicaleb@gmail.com>
  • Loading branch information
etemesi254 committed Dec 12, 2022
1 parent 033aafc commit 5877c2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zune-inflate/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ pub const LITLEN_ENOUGH: usize = 2342;
/// Maximum bits found in the lookup table for offsets
/// offsets larger than this require a lookup into a sub-table
pub const OFFSET_TABLEBITS: usize = 8;
pub const OFFSET_ENOUGH: usize = 402;
/// Note, default libdeflate value is 402, but with 512,
/// we can remove a branch check by simply doing & 511, and I'll take that.
pub const OFFSET_ENOUGH: usize = 512;
/// Maximum number of symbols across all codes
pub const DEFLATE_MAX_NUM_SYMS: usize = 288;

Expand Down

0 comments on commit 5877c2f

Please sign in to comment.