You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importbsonimportstructf=open("python-test.jlso", "rb")
fbytes=f.read()
header=bson.loads(fbytes)
obj_names=header['data'][1][0]
# Obviously you could generalize this to iterate over the `obj_names`obj_nbytes=struct.unpack('l', header['data'][1][1]['data'])
obj_pos=struct.unpack('l', header['data'][1][2]['data'])
# Example extracting a bson data objectf.seek(obj_pos[0])
bson_data=bson.loads(f.read(obj_nbytes[0]))
scores=struct.unpack('llll', bson_data['data'][1][0]['data'])
f.close()
The text was updated successfully, but these errors were encountered:
This should ensure that:
Snippet:
The text was updated successfully, but these errors were encountered: