private long getPropertyTag(long streamID, long nameOffset, long propertyNameCRC32) {
        List<Chunk> chunks = chunksById.get((int) streamID);
        if (chunks == null) {
            return 0;
        }
        for (Chunk chunk : chunks) {
            if (chunk == null || chunk.getType() != Types.BINARY || chunk.getChunkId() != streamID) {
                continue;
            }
            byte[] matchChunkBytes = ((ByteChunk) chunk).getValue();
            if (matchChunkBytes == null) {
                continue;
            }
            LittleEndianByteArrayInputStream leis = new LittleEndianByteArrayInputStream(matchChunkBytes);
            for (int m = 0; m < matchChunkBytes.length / 8; m++) {
                long nameCRC = leis.readUInt();
                int matchGuidIndex = leis.readUShort();
                int matchPropertyIndex = leis.readUShort();
                int matchPropertyKind = matchGuidIndex & 0x01;

                if (nameCRC == (matchPropertyKind == 0 ? nameOffset : propertyNameCRC32)) {
                    return 0x8000L + matchPropertyIndex;
                }
            }
        }
        return 0;
    }
Get property tag id by property set GUID and string name or numerical name from named properties mapping

@param guid Property set GUID in registry format without brackets.
            May be one of the PS_* or PSETID_* constants
@param name Property name in case of string named property
@param id   Property id in case of numerical named property
@return Property tag which can be matched with {@link MAPIProperty#id}
or 0 if the property could not be found.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/msg/TikaNameIdChunks.java