Question:
I have a large file (~500 Mo) that contains a dictionary of dictionaries like this :Thank you,
Answer:
You can’t start reading from the middle of a gzip stream. You need to start from the beginning and read until you find what you’re looking for. However you do not need to read the whole thing into memory. Just read small chunks at a time, giving the chunk size toread()
.For fast access, I would recommend copying your data into an sqlite3 database.
If you have better answer, please add a comment about this, thank you!