def file_object_map(fdata: Callable) -> list:
    """Parse whole file in sequential order without using xref."""
    sections = []
    bdata, _, _, length = fdata(0, -1) #Read all
    i = 0
    while i < length:
        mo = parse_region(bdata, i)
        if mo is None:
            break
        bo, eo, t, content = mo
        sections.append(mo)
        if t == 'XREFTABLE':
            table = content['table']
            subsection = -1
            for i, a in enumerate(table):
                if len(a) == 2:
                    subsection += 1
                    ln = 0
                    continue
                index, i_num, i_gen, s = a
                r_pos = subsection, ln
                s = (r_pos, None, 'XREF', ('XREF_T', index, i_num, i_gen, s))
                table[i] = s
                ln += 1
        elif t == 'IND_OBJ' and type(content['obj']) == Stream:
            if content['obj']['entries'].get('/Type') == '/XRef':
                xrefstream = parse_xref_stream_raw(content['obj'], bo)
                _, _, typ, obj = xrefstream
                table = obj['table']
                current_sub = -1
                sections.append(xrefstream)
                for i, a in enumerate(table):
                    index, env_num, i_num, i_gen, s, raw_line, subsection = a
                    if subsection != current_sub:
                        ln = -1
                        current_sub = subsection
                    ln += 1
                    r_pos = subsection, ln
                    s = (r_pos, None, 'XREF', ('XREF_S', index, i_num, i_gen, s, env_num, raw_line))
                    table[i] = s
            elif content['obj']['entries'].get('/Type') == '/ObjStm':
                _, _, typ, obj = parse_object_stream(content['obj'], content['o_num'])
                j = 0
                for embedded in obj:
                    i_num, obj, env_num, theorical_pos, actual_pos = embedded
                    abs_pos = bo + (j + 1) / 10000
                    r_pos = bo, actual_pos, j
                    j += 1
                    s = (abs_pos, r_pos, 'IND_OBJ', {'o_num':i_num, 'o_gen':None, 'obj':obj, 'env_num':env_num})
                    sections.append(s)
        i = eo
    return sections
Parse whole file in sequential order without using xref.
pdfsyntax/filestruct.py