private void initGroup(InternalDataTypeComponent dataTypeComponent, boolean isLastComponent) {

		groupOffset = getLength();
		lastAlignment = 1;

		if (dataTypeComponent.isBitFieldComponent()) {

			BitFieldDataType zeroBitFieldDt = (BitFieldDataType) dataTypeComponent.getDataType();

			if (dataTypeComponent.isZeroBitFieldComponent()) {

				// An alignment of -1 indicates field is ignored
				int alignment = getZeroBitFieldAlignment(zeroBitFieldDt, isLastComponent);

				int zeroBitOffset = dataOrganization.isBigEndian() ? 7 : 0;
				if (zeroBitFieldDt.getBitOffset() != zeroBitOffset ||
					zeroBitFieldDt.getStorageSize() != 1) {
					try {
						BitFieldDataType packedBitFieldDt = new BitFieldDataType(
							zeroBitFieldDt.getBaseDataType(), 0, zeroBitOffset);
						dataTypeComponent.setDataType(packedBitFieldDt);
					}
					catch (InvalidDataTypeException e) {
						throw new AssertException("unexpected", e);
					}
					componentsChanged = true;
				}

				if (isLastComponent) {
					// special handling of zero-length bitfield when it is last component
					int offset = DataOrganizationImpl.getAlignedOffset(zeroBitFieldDt.getBaseDataType().getAlignment(), groupOffset);
					updateComponent(dataTypeComponent, nextOrdinal, offset, 0, alignment > 0 ? alignment : 1);
					groupOffset = -1;
				}
				else {
					// Avoid conveying zero alignment onto structure
					// Next component can influence alignment
					zeroAlignment = alignment;

					// NOTE: MSVC always conveys zero-length alignment
					if (bitFieldPacking.useMSConvention()) {
						lastAlignment = alignment;
					}

					// defer update of zero-length component and final determination of alignment.
				}
			}
			else {
				lastComponent = null; // first in allocation group
				alignAndPackBitField(dataTypeComponent); // relies on groupOffset when lastComponent==null
			}
		}
		else {
			// pack non-bitfield
			lastComponent = null; // first in allocation group
			alignAndPackNonBitfieldComponent(dataTypeComponent, groupOffset);
		}
	}
Get structure length after all components have been added.
@return structure length
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AlignedComponentPacker.java