code: static private int readBitsForS16(int[] in, final int inIntOffset,
                  final int inWithIntOffset, final int bits) {
                  final int val = (in[inIntOffset] >>> inWithIntOffset);
                  return val & (0xffffffff >>> (32 - bits));
          }
docs: Read a certain number of bits of a integer on the input array
  
  @param in
  the input array
  @param inIntOffset
  the start offset in ints in the input array
  @param inWithIntOffset
  the start offset within a int in the input array
  @param bits
  the number of bits to be read
  @return the bits bits of the input