def limitedStreamSearch(file, tag, searchLength):
    """
    Search a stream for a tag with a limited length search.

    :param file: Already opened file object.
    :param tag: Text tag to search in the file.
    :param searchLength: Search only this length in the file.
    :rtpye: bool
    :return: True if the tag is found and the file is at the position after the tag.
    :return: The file position is reset to the origin position if tag is not found.
    """

    startPos = file.tell()

    buffer = file.read(searchLength)
    tagPos = buffer.find(tag)

    if tagPos == -1:
        file.seek(startPos)
        return False
    else:
        # Add one for the null character used in the tag.
        filePosition = startPos + tagPos + len(tag) + 1
        file.seek(filePosition)
        return True