Skip to main content

split_block

Function split_block 

Source
fn split_block(at: usize, section: &[u8]) -> Result<(Cid, &[u8]), CarError>
Expand description

Splits one block section into the CID it is filed under and its bytes.

The CID is not length-prefixed: it is self-describing, and where it ends is where the block begins. [Cid::read] is what knows that.