public boolean check (byte[] data_)
    {
        //  This function is on critical path. It deliberately doesn't use
        //  recursion to get a bit better performance.
        Trie current = this;
        int start = 0;
        while (true) {

            //  We've found a corresponding subscription!
            if (current.refcnt > 0)
                return true;

            //  We've checked all the data and haven't found matching subscription.
            if (data_.length == start)
                return false;

            //  If there's no corresponding slot for the first character
            //  of the prefix, the message does not match.
            byte c = data_[start];
            if (c < current.min || c >= current.min + current.count)
                return false;

            //  Move to the next character.
            if (current.count == 1)
                current = current.next[0];
            else {
                current = current.next[c - current.min];
                if (current == null)
                    return false;
            }
            start++;
        }
    }