Bit twiddling in ANSI Common Lisp
Compare Lisp versus C manipulating 5 bits from a sequence with 7 or more bytes:
(setf bits (ldb (byte 5 7) value))
bits = (word >> 7) & 0x1F;
(setf new-value (dpb bits (byte 5 7) value))
new_value = (value & (~(0x1F << 7)))|((bits & 0x1F) << 7);