Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/enc/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ static kContextLookup: [u8; 2048] = [
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7,
];
#[cfg(not(feature = "disallow_large_window_size"))]
pub const BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS: usize = 544;
#[cfg(feature = "disallow_large_window_size")]
pub const BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS: usize = 520;
pub const BROTLI_NUM_LITERAL_SYMBOLS: usize = 256;
pub const BROTLI_NUM_COMMAND_SYMBOLS: usize = 704;
pub const BROTLI_WINDOW_GAP: usize = 16;
Expand Down
9 changes: 3 additions & 6 deletions src/enc/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use super::super::alloc;
use super::super::alloc::{SliceWrapper, SliceWrapperMut};
use super::block_split::BlockSplit;
use super::command::Command;
use super::constants::{kSigned3BitContextLookup, kUTF8ContextLookup};
use super::constants::{
kSigned3BitContextLookup, kUTF8ContextLookup, BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS,
};
use super::util::floatX;
use super::vectorization::Mem256i;

Expand Down Expand Up @@ -63,11 +65,6 @@ impl Default for HistogramCommand {
}
//#[derive(Clone)] // #derive is broken for arrays > 32

#[cfg(not(feature = "disallow_large_window_size"))]
const BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS: usize = 544;
#[cfg(feature = "disallow_large_window_size")]
const BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS: usize = 520;

pub struct HistogramDistance {
pub data_: [u32; BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS],
pub total_count_: usize,
Expand Down