I have a byte array of variable size (3-5).
I need to extract N-bit signed integer stored as two's complement, having a range of -2^(N-1) + 1 to +2^(N-1) – 1
-2^(N-1) + 1 to +2^(N-1) – 1
How can I do that?