isLegalTopLevelOpcode function

bool isLegalTopLevelOpcode(
  1. int opcode
)

True when a specified opcode is itself a top-level record.

Attribute Stream is an embedded structure inside a Chunk or delta group, and Attachment Index remains reserved with an explicit writer prohibition. Keeping their registry names is useful to inspection output; it does not make either legal in the outer record sequence.

Implementation

bool isLegalTopLevelOpcode(int opcode) =>
    isSpecifiedOpcode(opcode) &&
    opcode != opAttributeStream &&
    opcode != opAttachmentIndex;