Module symphonia_core::util::bits

source ·
Expand description

Utilities for bit manipulation.

Functions§

  • Returns true if the unsigned 16-bit integer contains one or more bytes which have all bits set.
  • Returns true if the unsigned 32-bit integer contains one or more bytes which have all bits set.
  • Returns true if the unsigned 64-bit integer contains one or more bytes which have all bits set.
  • Masks the bit at the specified bit index.
  • Masks all bits with an index less than idx.
  • Masks all bits with an index less than or equal to idx.
  • Masks out all bits in positions less than upper, but greater than or equal to lower (upper < bit <= lower)
  • Masks all bits with an index greater than idx.
  • Masks all bits with an index greater than or equal to idx.
  • Sign extends an arbitrary, 8-bit or less, signed two’s complement integer stored within an u8 to a full width i8.
  • Sign extends an arbitrary, 16-bit or less, signed two’s complement integer stored within an u16 to a full width i16.
  • Sign extends an arbitrary, 32-bit or less, signed two’s complement integer stored within an u32 to a full width i32.
  • Sign extends an arbitrary, 64-bit or less, signed two’s complement integer stored within an u64 to a full width i64.
  • Returns the number of trailing ones in an unsigned 8-bit integer.
  • Returns the number of trailing ones in an unsigned 16-bit integer.
  • Returns the number of trailing ones in an unsigned 32-bit integer.
  • Returns the number of trailing ones in an unsigned 64-bit integer.