pub fn count_bits(&self, digest: <Self as Engine>::Digest) -> u32 {
        let mut bits = self.chunk_bits;
        let mut rsum = digest >> self.chunk_bits;
        // Yes, the ordering of this loop does mean that the
        // `CHUNK_BITS+1`th bit will be ignored. This isn't actually
        // a problem as the distribution of values will be the same,
        // but it is unexpected.
        loop {
            rsum >>= 1;
            if (rsum & 1) == 0 {
                break;
            }
            bits += 1;
        }
        bits
    }
/// Counts the number of low bits set in the rollsum, assuming
/// the digest has the bottom `CHUNK_BITS` bits set to `1`
/// (i.e. assuming a digest at a default bup chunk edge, as
/// returned by `find_chunk_edge`).
/// Be aware that there's a deliberate 'bug' in this function
/// in order to match expected return values from other bupsplit
/// implementations.
// Note: because of the state is reset after finding an edge, assist
// users use this correctly by making them pass in a digest they've
// obtained.
Counts the number of low bits set in the rollsum, assuming
the digest has the bottom `CHUNK_BITS` bits set to `1`
.
Be aware that there's a deliberate 'bug' in this function
in order to match expected return values from other bupsplit
implementations.
Note: because of the state is reset after finding an edge, assist
users use this correctly by making them pass in a digest they've
obtained.
Counts the number of low bits set in the rollsum assuming the digest has the bottom ` CHUNK_BITS ` bits set to ` 1 ` . Be aware that there ' s a deliberate ' bug ' in this function in order to match expected return values from other bupsplit implementations . Note : because of the state is reset after finding an edge assist users use this correctly by making them pass in a digest they ' ve obtained .
pub fn count_bits(&self, digest: <Self as Engine>::Digest) -> u32 {
        let mut bits = self.chunk_bits;
        let mut rsum = digest >> self.chunk_bits;
        // Yes, the ordering of this loop does mean that the
        // `CHUNK_BITS+1`th bit will be ignored. This isn't actually
        // a problem as the distribution of values will be the same,
        // but it is unexpected.
        loop {
            rsum >>= 1;
            if (rsum & 1) == 0 {
                break;
            }
            bits += 1;
        }
        bits
    }
pub fn count_bits ( & self , digest : < Self as Engine > :: Digest ) -> u32 { let mut bits = self . chunk_bits ; let mut rsum = digest >> self . chunk_bits ; // Yes, the ordering of this loop does mean that the // `CHUNK_BITS+1`th bit will be ignored. This isn't actually // a problem as the distribution of values will be the same, // but it is unexpected. loop { rsum >>= 1 ; if ( rsum & 1 ) == 0 { break ; } bits += 1 ; } bits }
Counts the number of low bits set in the rollsum, assuming
the digest has the bottom `CHUNK_BITS` bits set to `1`
(i.e.
Counts the number of low bits set in the rollsum assuming the digest has the bottom ` CHUNK_BITS ` bits set to ` 1 ` ( i . e .
&self
digest
<Self as Engine>::Digest