@@ -63,13 +63,12 @@ pub const EXCEPTIONAL_ENTRY: u32 = 0x4000;
63
63
pub const SECONDARY_TABLE_ENTRY : u32 = 0x2000 ;
64
64
65
65
/// The Decompressor state for a compressed block.
66
- #[ repr( align( 64 ) ) ]
67
66
#[ derive( Eq , PartialEq , Debug ) ]
68
67
struct CompressedBlock {
69
- litlen_table : [ u32 ; 4096 ] ,
68
+ litlen_table : Box < [ u32 ; 4096 ] > ,
70
69
secondary_table : Vec < u16 > ,
71
70
72
- dist_table : [ u32 ; 512 ] ,
71
+ dist_table : Box < [ u32 ; 512 ] > ,
73
72
dist_secondary_table : Vec < u16 > ,
74
73
75
74
eof_code : u16 ,
@@ -124,8 +123,8 @@ impl Decompressor {
124
123
buffer : 0 ,
125
124
nbits : 0 ,
126
125
compression : CompressedBlock {
127
- litlen_table : [ 0 ; 4096 ] ,
128
- dist_table : [ 0 ; 512 ] ,
126
+ litlen_table : Box :: new ( [ 0 ; 4096 ] ) ,
127
+ dist_table : Box :: new ( [ 0 ; 512 ] ) ,
129
128
secondary_table : Vec :: new ( ) ,
130
129
dist_secondary_table : Vec :: new ( ) ,
131
130
eof_code : 0 ,
@@ -411,7 +410,7 @@ impl Decompressor {
411
410
& code_lengths[ ..hlit] ,
412
411
& LITLEN_TABLE_ENTRIES ,
413
412
& mut codes[ ..hlit] ,
414
- & mut compression. litlen_table ,
413
+ & mut * compression. litlen_table ,
415
414
& mut compression. secondary_table ,
416
415
false ,
417
416
true ,
@@ -433,7 +432,7 @@ impl Decompressor {
433
432
lengths,
434
433
& tables:: DISTANCE_TABLE_ENTRIES ,
435
434
& mut dist_codes,
436
- & mut compression. dist_table ,
435
+ & mut * compression. dist_table ,
437
436
& mut compression. dist_secondary_table ,
438
437
true ,
439
438
false ,
0 commit comments