fn fletcher64(buf: &[u8], previous: u64) -> u64 {
    assert!(buf.len() % 4 == 0);
    let mut lo = previous as u32;
    let mut hi = (previous >> 32) as u32;
    for chunk in buf.chunks(4) {
        lo = lo.wrapping_add(LittleEndian::read_u32(chunk));
        hi = hi.wrapping_add(lo);
    }
    (hi as u64) << 32 | lo as u64
}
// All journal blocks are covered by a fletcher64 checksum as the last 8 bytes in a block.
All journal blocks are covered by a fletcher64 checksum as the last 8 bytes in a block.
All journal blocks are covered by a fletcher64 checksum as the last 8 bytes in a block .
fn fletcher64(buf: &[u8], previous: u64) -> u64 {
    assert!(buf.len() % 4 == 0);
    let mut lo = previous as u32;
    let mut hi = (previous >> 32) as u32;
    for chunk in buf.chunks(4) {
        lo = lo.wrapping_add(LittleEndian::read_u32(chunk));
        hi = hi.wrapping_add(lo);
    }
    (hi as u64) << 32 | lo as u64
}
fn fletcher64 ( buf : & [ u8 ] , previous : u64 ) -> u64 { assert ! ( buf len ( ) 4 0 ) ; let mut lo = previous as u32 ; let mut hi = ( previous >> 32 ) as u32 ; for chunk in buf . chunks ( 4 ) { lo = lo . wrapping_add ( LittleEndian :: read_u32 ( chunk ) ) ; hi = hi . wrapping_add ( lo ) ; } ( hi as u64 ) << 32 | lo as u64 }
All journal blocks are covered by a fletcher64 checksum as the last 8 bytes in a block.
All journal blocks are covered by a fletcher64 checksum as the last 8 bytes in a block .
buf
&[u8]
previous
u64
buf
&[u8]
previous
u64