static final BitFieldDataType getBitFieldDataType(long id, DataTypeManagerDB dtm) {

		int bitSize = (int) (id & 0xff); // 8-bits
		int bitOffset = (int) ((id >> BIT_OFFSET_SHIFT) & 0xff); // 8-bits
		int baseTypeInfo = (int) ((id >> BASE_TYPE_SHIFT) & 0xff); // 8-bit encoded field

		BaseDatatypeKind baseDataTypeKind = BaseDatatypeKind.getKind((baseTypeInfo >> 5) & 3);
//		boolean extraStorageUsed = (baseTypeInfo & 0x10) != 0;

		DataType baseDataType = null;
		long dataTypeIndex = (id >> DATATYPE_INDEX_SHIFT) & MAX_DATATYPE_INDEX; // 32-bits
		if (baseDataTypeKind != BaseDatatypeKind.NONE && dataTypeIndex != MAX_DATATYPE_INDEX) {
			if (baseDataTypeKind == BaseDatatypeKind.TYPEDEF) {
				baseDataType = getTypeDef(dataTypeIndex, dtm);
			}
			else if (baseDataTypeKind == BaseDatatypeKind.ENUM) {
				baseDataType = getEnum(dataTypeIndex, dtm);
			}
			else {
				baseDataType = getIntegerType(dataTypeIndex, dtm);
			}
		}
		try {
			if (baseDataType == null) {
				// use integer datatype on failure
				baseDataType = IntegerDataType.dataType.clone(dtm);
			}
//			int effectiveBitSize = getEffectiveBitSize(bitSize, baseDataType.getLength());
//			int storageSize = getMinimumStorageSize(effectiveBitSize);
//			if (extraStorageUsed) {
//				++storageSize;
//			}
			return new BitFieldDBDataType(baseDataType, bitSize, bitOffset);
		}
		catch (InvalidDataTypeException e) {
			return null;
		}
	}
Get a bit-field datatype instance for a given ID.  The upper byte of the ID will be ignored.
@param id bit-field datatype ID
@param dtm data type manager
@return bit-field data type
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/BitFieldDBDataType.java