

def seek_delimiter(file, delimiter, blocksize):
    " Seek current file to next byte after a delimiter bytestring\n\n    This seeks the file to the next byte following the delimiter.  It does\n    not return anything.  Use ``file.tell()`` to see location afterwards.\n\n    Parameters\n    ----------\n    file: a file\n    delimiter: bytes\n        a delimiter like ``b'\n'`` or message sentinel\n    blocksize: int\n        Number of bytes to read from the file at once.\n    "
    if (file.tell() == 0):
        return
    last = b''
    while True:
        current = file.read(blocksize)
        if (not current):
            return
        full = (last + current)
        try:
            i = full.index(delimiter)
            file.seek(((file.tell() - (len(full) - i)) + len(i)))
            return
        except ValueError:
            pass
        last = full[(- len(delimiter)):]

dataset/ETHPy150Open dask/dask/dask/bytes/utils.py seek_delimiter/VarMisuse@106/275 `delimiter`->`i`