11#![ allow( unknown_lints) ]
2- #![ allow( dead_code) ]
32#![ allow( unused_macros) ]
43
54use core:: cmp:: { max, min} ;
@@ -49,48 +48,10 @@ fn window_size_from_lgwin(lgwin: i32) -> usize {
4948 ( 1 << lgwin) - 16usize
5049}
5150
52- fn context_type_str ( context_type : ContextType ) -> & ' static str {
53- match context_type {
54- ContextType :: CONTEXT_LSB6 => "lsb6" ,
55- ContextType :: CONTEXT_MSB6 => "msb6" ,
56- ContextType :: CONTEXT_UTF8 => "utf8" ,
57- ContextType :: CONTEXT_SIGNED => "sign" ,
58- }
59- }
60-
61- fn prediction_mode_str (
62- prediction_mode_nibble : interface:: LiteralPredictionModeNibble ,
63- ) -> & ' static str {
64- match prediction_mode_nibble. prediction_mode ( ) {
65- interface:: LITERAL_PREDICTION_MODE_SIGN => "sign" ,
66- interface:: LITERAL_PREDICTION_MODE_LSB6 => "lsb6" ,
67- interface:: LITERAL_PREDICTION_MODE_MSB6 => "msb6" ,
68- interface:: LITERAL_PREDICTION_MODE_UTF8 => "utf8" ,
69- _ => "unknown" ,
70- }
71- }
72-
73- fn is_long_enough_to_be_random ( len : usize , high_entropy_detection_quality : u8 ) -> bool {
74- match high_entropy_detection_quality {
75- 0 => false ,
76- 1 => false ,
77- 2 => len >= 128 ,
78- 3 => len >= 96 ,
79- 4 => len >= 64 ,
80- 5 => len >= 48 ,
81- 6 => len >= 32 ,
82- 7 => len >= 24 ,
83- 8 => len >= 16 ,
84- 9 => len >= 8 ,
85- 10 => len >= 4 ,
86- 11 => len >= 1 ,
87- _ => len >= 8 ,
88- }
89- }
90- const COMMAND_BUFFER_SIZE : usize = 4096 ;
91-
9251struct CommandQueue < ' a , Alloc : BrotliAlloc + ' a > {
9352 mb : InputPair < ' a > ,
53+ // TODO: delete unused fields
54+ #[ allow( dead_code) ]
9455 mb_byte_offset : usize ,
9556 mc : & ' a mut Alloc ,
9657 queue : <Alloc as Allocator < StaticCommand > >:: AllocatedMemory ,
@@ -100,9 +61,12 @@ struct CommandQueue<'a, Alloc: BrotliAlloc + 'a> {
10061 best_strides_per_block_type : <Alloc as Allocator < u8 > >:: AllocatedMemory ,
10162 entropy_pyramid : find_stride:: EntropyPyramid < Alloc > ,
10263 context_map_entropy : ContextMapEntropy < ' a , Alloc > ,
64+ #[ allow( dead_code) ]
10365 stride_detection_quality : u8 ,
66+ #[ allow( dead_code) ]
10467 high_entropy_detection_quality : u8 ,
10568 block_type_literal : u8 ,
69+ #[ allow( dead_code) ]
10670 best_stride_index : usize ,
10771 overfull : bool ,
10872}
@@ -149,9 +113,6 @@ impl<'a, Alloc: BrotliAlloc> CommandQueue<'a, Alloc> {
149113 self . overfull = true ;
150114 }
151115 }
152- fn size ( & self ) -> usize {
153- self . loc
154- }
155116 fn clear ( & mut self ) {
156117 self . loc = 0 ;
157118 self . block_type_literal = 0 ;
@@ -2435,8 +2396,6 @@ fn StoreDataWithHuffmanCodes(
24352396 }
24362397}
24372398
2438- fn nop < ' a > ( _data : & [ interface:: Command < InputReference > ] ) { }
2439-
24402399#[ deprecated( note = "use store_meta_block_trivial instead" ) ]
24412400pub fn BrotliStoreMetaBlockTrivial < Alloc : BrotliAlloc , Cb > (
24422401 alloc : & mut Alloc ,
0 commit comments