isValid static method

bool isValid(
  1. int head
)

Implementation

static bool isValid(int head) {
  var rsv = head & rsvMask;
  var opcode = head & opCodeMask;
  if (rsv != 0 ||
      (3 <= opcode && opcode <= 7) ||
      (0xB <= opcode && opcode <= 0xF)) {
    return false;
  }
  return true;
}