zig-bitjuggle
zig-bitjuggle copied to clipboard
Various "bit juggling" helpers and functionality
trafficstars
zig-bitjuggle
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 unionto represent arbitrary bit fieldsBit- Used along withextern unionto represent bit fieldsBoolean- Used along withextern unionto represent boolean bit fields
The Bitfield, Bit & Boolean types are taken pretty much verbatim from Florence (see LICENSE-FLORENCE for original license)
How to get
Gyro
gyro add leecannon/bitjuggle
Zigmod
zigmod aq add 1/leecannon/bitjuggle
Git
Submodule
git submodule add https://github.com/leecannon/zig-bitjuggle zig-bitjuggle
Clone
git clone https://github.com/leecannon/zig-bitjuggle