Skip to content

dlib.core.bitio

Timur Gafarov edited this page Apr 26, 2017 · 1 revision

dlib.core.bitio

Bit-level manipulations.

Free functions

  • T hiNibble(T)(T b) - returns high nibble (half-byte) of a byte b.
  • T loNibble(T)(T b) - returns low nibble (half-byte) of a byte b.
  • T swapEndian16(T)(T n) - returns 16-bit integer n with swapped endianness.
  • T setBit(T)(T b, uint pos, bool state) - sets bit at position pos in integer b to state.
  • bool getBit(T)(T b, uint pos) - returns bit at position pos in integer b.
Clone this wiki locally