/// Returns the current crc32 checksum. pubfn sum(&self) -> u32 { self.hasher.clone().finalize()
}
/// The number of bytes that have been used to calculate the CRC. /// This value is only accurate if the amount is lower than 2<sup>32</sup>. pubfn amount(&self) -> u32 { self.amt
}
/// Update the CRC with the bytes in `data`. pubfn update(&mutself, data: &[u8]) { self.amt = self.amt.wrapping_add(data.len() as u32); self.hasher.update(data);
}
/// Combine the CRC with the CRC for the subsequent block of bytes. pubfn combine(&mutself, additional_crc: &Crc) { self.amt = self.amt.wrapping_add(additional_crc.amt); self.hasher.combine(&additional_crc.hasher);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.