def read_to_whitespace(fptr, track):
    """
    Read, skipping over white space.  Then read all non-whitespace until one
    character of white space is consumed.  Return the non-whitespace that was
    read.  If the end of the file is encountered, return any non-whitespace if
    available, or an empty bytes string.
    Enter: fptr: file-like object to read from.
           track: a dictionary used to hold temporary values
    Exit:  val: non-whitespace string
    """
    if 'data' in track:
        if track['next'] < len(track['data']) - 1:
            out = track['data'][track['next']]
            track['next'] += 1
            return out
        data = track['data'][-1][:-1]
    else:
        data = b''
    track['data'] = (data + fptr.read(1024 * 1024) + b'X').split()
    out = track['data'][0]
    track['next'] = 1
    return out