@@ -295,7 +295,6 @@ pub struct LiteralsBlockResult<F> {
295
295
pub offset : usize ,
296
296
pub witness_rows : Vec < ZstdWitnessRow < F > > ,
297
297
pub literals : Vec < u64 > ,
298
- pub regen_size : usize ,
299
298
}
300
299
301
300
#[ allow( clippy:: too_many_arguments) ]
@@ -318,7 +317,6 @@ fn process_block_zstd<F: Field>(
318
317
offset : byte_offset,
319
318
witness_rows : rows,
320
319
regen_size,
321
- compressed_size : _,
322
320
} = process_block_zstd_literals_header :: < F > ( src, block_idx, byte_offset, last_row, randomness) ;
323
321
324
322
witness_rows. extend_from_slice ( & rows) ;
@@ -327,7 +325,6 @@ fn process_block_zstd<F: Field>(
327
325
offset : byte_offset,
328
326
witness_rows : rows,
329
327
literals,
330
- regen_size : _,
331
328
} = {
332
329
let last_row = rows. last ( ) . cloned ( ) . unwrap ( ) ;
333
330
let multiplier =
@@ -376,7 +373,6 @@ fn process_block_zstd<F: Field>(
376
373
} )
377
374
. collect :: < Vec < _ > > ( ) ,
378
375
literals : literals. iter ( ) . map ( |b| * b as u64 ) . collect :: < Vec < u64 > > ( ) ,
379
- regen_size,
380
376
}
381
377
} ;
382
378
@@ -1606,7 +1602,6 @@ pub struct LiteralsHeaderProcessingResult<F> {
1606
1602
pub offset : usize ,
1607
1603
pub witness_rows : Vec < ZstdWitnessRow < F > > ,
1608
1604
pub regen_size : usize ,
1609
- pub compressed_size : usize ,
1610
1605
}
1611
1606
1612
1607
fn process_block_zstd_literals_header < F : Field > (
@@ -1626,12 +1621,11 @@ fn process_block_zstd_literals_header<F: Field>(
1626
1621
let literals_block_type = BlockType :: from ( lh_bytes[ 0 ] & 0x3 ) ;
1627
1622
let size_format = ( lh_bytes[ 0 ] >> 2 ) & 3 ;
1628
1623
1629
- let [ n_bits_fmt, n_bits_regen, n_bits_compressed, _n_streams, n_bytes_header, _branch] : [ usize ;
1630
- 6 ] = match literals_block_type {
1624
+ let [ n_bits_fmt, n_bits_regen, n_bytes_header] : [ usize ; 3 ] = match literals_block_type {
1631
1625
BlockType :: RawBlock => match size_format {
1632
- 0b00 | 0b10 => [ 1 , 5 , 0 , 1 , 1 , 0 ] ,
1633
- 0b01 => [ 2 , 12 , 0 , 1 , 2 , 1 ] ,
1634
- 0b11 => [ 2 , 20 , 0 , 1 , 3 , 2 ] ,
1626
+ 0b00 | 0b10 => [ 1 , 5 , 1 ] ,
1627
+ 0b01 => [ 2 , 12 , 2 ] ,
1628
+ 0b11 => [ 2 , 20 , 3 ] ,
1635
1629
_ => unreachable ! ( "size_format out of bound" ) ,
1636
1630
} ,
1637
1631
_ => unreachable ! ( "BlockType::* unexpected. Must be raw bytes for literals." ) ,
@@ -1644,8 +1638,6 @@ fn process_block_zstd_literals_header<F: Field>(
1644
1638
} ) [ ( 2 + n_bits_fmt) ..( n_bytes_header * N_BITS_PER_BYTE ) ] ;
1645
1639
1646
1640
let regen_size = le_bits_to_value ( & sizing_bits[ 0 ..n_bits_regen] ) as usize ;
1647
- let compressed_size =
1648
- le_bits_to_value ( & sizing_bits[ n_bits_regen..( n_bits_regen + n_bits_compressed) ] ) as usize ;
1649
1641
let tag_next = match literals_block_type {
1650
1642
BlockType :: RawBlock => ZstdTag :: ZstdBlockLiteralsRawBytes ,
1651
1643
_ => unreachable ! ( "BlockType::* unexpected. Must be raw bytes for literals." ) ,
@@ -1698,7 +1690,6 @@ fn process_block_zstd_literals_header<F: Field>(
1698
1690
} )
1699
1691
. collect :: < Vec < _ > > ( ) ,
1700
1692
regen_size,
1701
- compressed_size,
1702
1693
}
1703
1694
}
1704
1695
0 commit comments