1

I'm writing a file reader for my (binary) format and I sometimes need to skip some portion of the file.

I could do fileobject.read(howmuchtoskip) for that, but I guess that will load the unneeded part to memory and will be slow.

Can I just set the "index" of the "pointer" or whatever that's called?

0

1 Answer 1

7

Use fileobject.seek(offset).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.