public static RecordLayout recordLayout(final ByteBuffer source,
                                          final int offset) {
    final byte headerByte0 = source.get(offset);
    final byte recordType = recordType(headerByte0);
    return switch (recordType) {
      case RECORD_TYPE_ACTUAL -> recordLayoutForType(ActualRecords.recordSizeType(headerByte0));
      case RECORD_TYPE_MOVED -> MovedRecord.INSTANCE;
      case RECORD_TYPE_PADDING -> PaddingRecord.INSTANCE;
      case RECORD_TYPE_PARTIAL -> throw new UnsupportedOperationException("RECORD_TYPE_PARTIAL is not supported yet");
      default -> throw new AssertionError("Bug: type " + recordType + " is unknown");
    };
  }
public static RecordLayout recordLayout(final ByteBuffer source,
                                          final int offset)