File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ half = { version = "2.4.1" }
2121quick-error = " 2.0.1"
2222
2323flate2 = { version = " 1.0.20" , optional = true }
24- weezl = { version = " 0.1.0 " , optional = true }
24+ weezl = { version = " 0.1.10 " , optional = true }
2525zstd = { version = " 0.13" , optional = true }
2626zune-jpeg = { version = " 0.4.17" , optional = true }
2727
Original file line number Diff line number Diff line change @@ -158,12 +158,15 @@ pub struct LZWReader<R: Read> {
158158impl < R : Read > LZWReader < R > {
159159 /// Wraps a reader
160160 pub fn new ( reader : R , compressed_length : usize ) -> LZWReader < R > {
161+ let configuration =
162+ weezl:: decode:: Configuration :: with_tiff_size_switch ( weezl:: BitOrder :: Msb , 8 )
163+ . with_yield_on_full_buffer ( true ) ;
161164 Self {
162165 reader : BufReader :: with_capacity (
163166 ( 32 * 1024 ) . min ( compressed_length) ,
164167 reader. take ( u64:: try_from ( compressed_length) . unwrap ( ) ) ,
165168 ) ,
166- decoder : weezl :: decode :: Decoder :: with_tiff_size_switch ( weezl :: BitOrder :: Msb , 8 ) ,
169+ decoder : configuration . build ( ) ,
167170 }
168171 }
169172}
You can’t perform that action at this time.
0 commit comments