public static boolean matchLatin1(String text, String pattern) {
        byte[] textBytes = getBytes(text);
        byte[] patternBytes = getBytes(pattern);
        int textReaderIndex = 0;
        int patternReaderIndex = 0;
        int textReaderIndexForMultipleToken = -1;
        int patternReaderIndexForMultipleToken = -1;
        int textLength = textBytes.length;
        int patternLength = patternBytes.length;

        while (textReaderIndex < textLength) {
            if (patternReaderIndex < patternLength
                    && (textBytes[textReaderIndex] == patternBytes[patternReaderIndex]
                            || patternBytes[patternReaderIndex] == SINGLE_TOKEN)) {
                textReaderIndex++;
                patternReaderIndex++;
            } else if (patternReaderIndex < patternLength
                    && patternBytes[patternReaderIndex] == MULTIPLE_TOKEN) {
                textReaderIndexForMultipleToken = textReaderIndex;
                patternReaderIndexForMultipleToken = patternReaderIndex++;
            } else if (textReaderIndexForMultipleToken >= 0) {
                textReaderIndex = ++textReaderIndexForMultipleToken;
                patternReaderIndex = patternReaderIndexForMultipleToken + 1;
            } else {
                return false;
            }
        }
        while (patternReaderIndex < patternLength && patternBytes[patternReaderIndex] == '*') {
            patternReaderIndex++;
        }
        return patternReaderIndex == patternLength;
    }
@implNote The method assumes the string does NOT contain any extended control character if it
          is encoded in LATIN1. Though Latin-1 is a subset of Unicode, Latin-1 and UTF-8 have
          different bit patterns.
@see <a href="https://cs.stanford.edu/people/miles/iso8859.html">iso8859</a>
turms-server-common/src/main/java/im/turms/server/common/infra/lang/StringUtil.java