Crate bitfrob

Expand description

A crate to help with bit manipulation of integers.

Structs

• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Iterator for groups of bits in an integer (low to high).
• Two `u8` values packed as a `u16`.

Constants

• When used as a multiplier, scales a “1 bit” `u8` to spread the value across all 8 bits.
• When used as a multiplier, scales a “2 bit” `u8` to spread the value across all 8 bits.
• When used as a multiplier, scales a “4 bit” `u8` to spread the value across all 8 bits.

Functions

• Splits a byte into 1-bit chunks.
• Splits a byte into 1-bit chunks (reversed).
• Splits a byte into 2-bit chunks.
• Splits a byte into 2-bit chunks (reversed).
• Splits a byte into 4-bit chunks.
• Splits a byte into 4-bit chunks (reversed).
• Determines if the `b` bit is set in `u`.
• Get the `low` to `high` bit region of `u`.
• Get the `low` to `high` bit region of `u`, down shifted by `low`.
• Generates a bit mask where all bits in the region are 1.
• Replicates the lowest `count` bits across the entire value.
• Replaces the `b` bit in `u`.
• Replaces the `low` to `high` bit region of `old`.
• Replaces the `low` to `high` bit region of `old` with an input up shifted by `low`.
• Determines if the `b` bit is set in `u`.
• Get the `low` to `high` bit region of `u`.
• Get the `low` to `high` bit region of `u`, down shifted by `low`.
• Generates a bit mask where all bits in the region are 1.
• Replicates the lowest `count` bits across the entire value.
• Replaces the `b` bit in `u`.
• Replaces the `low` to `high` bit region of `old`.
• Replaces the `low` to `high` bit region of `old` with an input up shifted by `low`.
• Determines if the `b` bit is set in `u`.
• Get the `low` to `high` bit region of `u`.
• Get the `low` to `high` bit region of `u`, down shifted by `low`.
• Generates a bit mask where all bits in the region are 1.
• Replicates the lowest `count` bits across the entire value.
• Replaces the `b` bit in `u`.
• Replaces the `low` to `high` bit region of `old`.
• Replaces the `low` to `high` bit region of `old` with an input up shifted by `low`.
• Determines if the `b` bit is set in `u`.
• Get the `low` to `high` bit region of `u`.
• Get the `low` to `high` bit region of `u`, down shifted by `low`.
• Generates a bit mask where all bits in the region are 1.
• Replicates the lowest `count` bits across the entire value.
• Replaces the `b` bit in `u`.
• Replaces the `low` to `high` bit region of `old`.
• Replaces the `low` to `high` bit region of `old` with an input up shifted by `low`.
• Determines if the `b` bit is set in `u`.
• Get the `low` to `high` bit region of `u`.
• Get the `low` to `high` bit region of `u`, down shifted by `low`.
• Generates a bit mask where all bits in the region are 1.
• Replicates the lowest `count` bits across the entire value.
• Replaces the `b` bit in `u`.
• Replaces the `low` to `high` bit region of `old`.
• Replaces the `low` to `high` bit region of `old` with an input up shifted by `low`.