Function filecoin_proofs::decode_from_range

source ยท
pub fn decode_from_range<R: Read, S: Read, W: Write>(
    nodes_count: usize,
    comm_d: Commitment,
    comm_r: Commitment,
    input_data: R,
    sector_key_data: S,
    output_data: &mut W,
    nodes_offset: usize,
    num_nodes: usize,
) -> Result<()>
Expand description

Decodes a range of data with the given sector key.

This function is similar to decode_from, the difference is that it operates directly on the given file descriptions. The current position of the file descriptors is where the decoding starts, i.e. you need to seek to the intended offset before you call this function. The nodes_offset is the node offset relative to the beginning of the file. This information is needed in order to do the decoding correctly. The nodes_count is the total number of nodes within the file. The num_nodes defines how many nodes will be decoded, starting from the current position.