fn bit_array_to_chunks_truncated<Data, Chunk>(
    data: Data,
) -> impl Iterator<Item = Chunk> + ExactSizeIterator + DoubleEndedIterator
where
    Data: BitArray + AsPrimitive<Chunk>,
    Chunk: BitArray,
{
    (0..(Data::BITS - data.leading_zeros() as usize))
        .step_by(Chunk::BITS)
        .rev()
        .map(move |shift| (data >> shift).as_())
}
/// Iterates from most significant to least significant bits in chunks but skips any
/// initial zero chunks.
Iterates from most significant to least significant bits in chunks but skips any
initial zero chunks.
Iterates from most significant to least significant bits in chunks but skips any initial zero chunks .
fn bit_array_to_chunks_truncated<Data, Chunk>(
    data: Data,
) -> impl Iterator<Item = Chunk> + ExactSizeIterator + DoubleEndedIterator
where
    Data: BitArray + AsPrimitive<Chunk>,
    Chunk: BitArray,
{
    (0..(Data::BITS - data.leading_zeros() as usize))
        .step_by(Chunk::BITS)
        .rev()
        .map(move |shift| (data >> shift).as_())
}
fn bit_array_to_chunks_truncated < Data , Chunk > ( data : Data , ) -> impl Iterator < Item = Chunk > + ExactSizeIterator + DoubleEndedIterator where Data : BitArray + AsPrimitive < Chunk > , Chunk : BitArray , { ( 0 .. ( Data :: BITS - data . leading_zeros ( ) as usize ) ) . step_by ( Chunk :: BITS ) . rev ( ) . map ( move | shift | ( data >> shift ) . as_ ( ) ) }
Iterates from most significant to least significant bits in chunks but skips any
initial zero chunks.
Iterates from most significant to least significant bits in chunks but skips any initial zero chunks .
data
Data
data
Data