Function forest_filecoin::db::car::plain::read_block_data_location_and_skip
source · fn read_block_data_location_and_skip(
reader: impl Read + Seek,
) -> Result<Option<(Cid, UncompressedBlockDataLocation)>>
Expand description
Returns (Cid
, the block data offset
and block data length
)
start ►│ reader end ►│
├───────────┬───┬──────────┤
│body length│cid│block data│
└───────────┴───┼──────────┤
│◄────────►│
│ =block data length
block data │
offset ►│
Importantly, we seek block data length
, rather than read any in.
This allows us to keep indexing fast.
[Ok(None)
] on EOF