protected static byte getBufferByte(uint[] buffer, int offset) { int index = offset / 4; int position = offset % 4; int bit_offset = 8 * position; return (byte)((buffer[index] >> bit_offset) & 0xff); }