xanderbailey commented on code in PR #3700:
URL: https://github.com/apache/iceberg-rust/pull/3700#discussion_r4666995675


##########
crates/iceberg/src/encryption/stream.rs:
##########
@@ -299,8 +319,15 @@ impl FileRead for AesGcmFileRead {
         let first_block = range.start / PLAIN_BLOCK_SIZE as u64;
         let last_block = range.end.saturating_sub(1) / PLAIN_BLOCK_SIZE as u64;
 
+        // The header is not authenticated, so it is read and checked along 
with the first block.
+        let header_length = if first_block == 0 {

Review Comment:
   Doing it lazily for later blocks looks like 
[4901922](https://github.com/apache/iceberg-rust/pull/3700/commits/490192217435fdc35b53e717c077473263b65542)
 what do you think? Can you think of a better way?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to