calc_total_chunks

Function calc_total_chunks 

Source
pub fn calc_total_chunks(
    total_size: i64,
    chunk_size: i64,
    context: &str,
) -> Result<i32>
Expand description

Calculates the number of chunks needed to cover total_size.

ยงErrors

Returns an error when total_size is negative, chunk_size is not positive, the rounding addition overflows, or the resulting chunk count does not fit in i32.