pub fn calc_size<S: IntoIterator<Item = u64>>(sizes: S) -> u64 {
    sizes
        .into_iter()
        .fold(1024, |total, sz| total + 512 + 512 * ((sz + 511) / 512))
}
///
/// Calculates size of tar archive from list/iterator of known sizes of it's content.
/// Works only for our case - e.g. contains files only
///
Calculates size of tar archive from list/iterator of known sizes of it's content.
Works only for our case - e.g. contains files only
Calculates size of tar archive from list / iterator of known sizes of it ' s content . Works only for our case - e . g . contains files only
pub fn calc_size<S: IntoIterator<Item = u64>>(sizes: S) -> u64 {
    sizes
        .into_iter()
        .fold(1024, |total, sz| total + 512 + 512 * ((sz + 511) / 512))
}
pub fn calc_size < S : IntoIterator < Item = u64 > > ( sizes : S ) -> u64 { sizes . into_iter ( ) . fold ( 1024 , | total , sz | total + 512 + 512 * ( ( sz + 511 ) / 512 ) ) }
Calculates size of tar archive from list/iterator of known sizes of it's content.
Calculates size of tar archive from list / iterator of known sizes of it ' s content .
sizes
S
sizes
S