@Override
    protected int doDeserializeFromByteArray(byte[] byteArray, int startIndex) throws IOException {
        BitReader bitReader = new BitReader(byteArray, startIndex);
        int numberOfContinousZeroBit = 0;
        while (numberOfContinousZeroBit < 8 && bitReader.moveNext()) {
            if (!bitReader.getCurrent()) {
                numberOfContinousZeroBit++;
            } else {
                break;
            }
        }

        switch (numberOfContinousZeroBit) {
            case 2:
                this.value = bitReader.readUInt32(5);
                this.guid = bitReader.readGuid();
                this.type = ExtendedGUID5BitUintType;
                return 17;

            case 5:
                this.value = bitReader.readUInt32(10);
                this.guid = bitReader.readGuid();
                this.type = ExtendedGUID10BitUintType;
                return 18;

            case 6:
                this.value = bitReader.readUInt32(17);
                this.guid = bitReader.readGuid();
                this.type = ExtendedGUID17BitUintType;
                return 19;

            case 7:
                this.value = bitReader.readUInt32(32);
                this.guid = bitReader.readGuid();
                this.type = ExtendedGUID32BitUintType;
                return 21;

            case 8:
                this.guid = GuidUtil.emptyGuid();
                this.type = ExtendedGUIDNullType;
                return 1;

            default:
                throw new InvalidOperationException(
                        "Failed to parse the ExGuid, the type value is unexpected");
        }
    }
This method is used to deserialize the ExGuid basic object from the specified byte array and start index.

@param byteArray  Specify the byte array.
@param startIndex Specify the start index from the byte array.
@return Return the length in byte of the ExGuid basic object.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/basic/ExGuid.java