def parse_xref_stream(xref_stream: dict, trailer_pos: int, o_num: int) -> list:
    """Return a list of dicts indexing indirect objects.

    for regular objects:
    - abs_pos is the absolute position of the object
    - o_num is the object number
    - o_gen is the object generation number
    for objects embedded in object streams:
    - env_num is the number of the envelope object
    - o_num is the object number
    - o_gen is the object generation number
    - o_pos is the position of the object within the stream
    """
    xref_stream_num = o_num
    xref = []
    table = []
    _, _, _, xref_table = parse_xref_stream_raw(xref_stream)
    lines = xref_table['table']
    #envs = xref_table['envs']
    for line in lines:
        offset, env_iref, o_num, o_gen, keyword, raw_line, _ = line
        if o_num == 0:
            table.append((raw_line, o_num))
            continue
        if keyword == b'f':
            continue
        if env_iref:
            #float_pos = envs[env_iref] + (offset + 1) / 10000
            float_pos = (env_iref, offset)
            xref.append({'o_pos': offset, 'env_num':env_iref, 'o_num': o_num, 'o_gen': o_gen, 'abs_pos': float_pos})
        else:
            xref.append({'abs_pos': offset, 'o_num': o_num, 'o_gen': o_gen})
        table.append((raw_line, o_num))
        o_num += 1
    trailer = {
        'o_num': 0,
        'o_gen': 0,
        'abs_pos': trailer_pos,
        'xref_stream_pos': trailer_pos,
        'xref_stream_num': xref_stream_num,
        #'xref_stream': table,              #Simplify
    }
    xref.insert(0, trailer)
    return xref
Return a list of dicts indexing indirect objects.

    for regular objects:
    - abs_pos is the absolute position of the object
    - o_num is the object number
    - o_gen is the object generation number
    for objects embedded in object streams:
    - env_num is the number of the envelope object
    - o_num is the object number
    - o_gen is the object generation number
    - o_pos is the position of the object within the stream
    
pdfsyntax/filestruct.py