private static bool DecodeBool(byte[] buffer, ref int offset) { var value = buffer[offset] != 0; offset += 1; return value; }