This package contains various "bit juggling" helpers and functionality:
isBitSet
- Check if a bit is setgetBit
- Get the value of a bitgetBits
- Get a range of bitssetBit
- Set a specific bitsetBits
- Set a range of bitsBitfield
- Used along withextern union
to represent arbitrary bit fieldsBit
- Used along withextern union
to represent bit fieldsBoolean
- Used along withextern union
to represent boolean bit fields
The Bitfield
, Bit
& Boolean
types are taken pretty much verbatim from Florence (see LICENSE-FLORENCE for original license)
git submodule add https://github.com/leecannon/zig-bitjuggle zig-bitjuggle
git clone https://github.com/leecannon/zig-bitjuggle