I am working on a TCP application that processes bit messages, which means: sent / received messages are not byte aligned. For example, 3 bits represent field 1, where 19 bits can represent field 2. My question is: does anyone know a C # library that can accept a set of bytes and set / receive an arbitrary range of bits in these bytes? I saw and created similar utilities in C / C ++, but I need a 100% C # solution, and I don't want to reinvent the wheel again.
I looked at the BitArray class, but it does not allow reference to arbitrary bit ranges.
source
share