pub struct Block {
pub payload_offset: u64,
pub compressed_size: u64,
pub original_size: u64,
pub content_hash: [u8; 32],
}Expand description
One block of a file’s content.
In a stipplefs payload (crate::Flags::STIPPLE_PAYLOAD) a block is a
slice of the file rather than a region of the payload: payload_offset
is where the slice starts within the file and compressed_size holds
the file’s stipplefs inode. See crate::payload.
Fields§
§payload_offset: u64Byte offset into the payload section where this block’s data begins.
compressed_size: u64Size of the block after compression.
original_size: u64Size of the block before compression.
content_hash: [u8; 32]BLAKE3 of this block’s decompressed bytes.
Hashing the decompressed form is what lets a random-access reader
verify one block without reassembling the whole entry, which is the
difference between serving a byte of a large file and buffering all
of it. Zero on manifests written before version 2, where the only
available check is the whole-entry hash on Entry.