Skip to content

Conversation

ayan4m1
Copy link

@ayan4m1 ayan4m1 commented Dec 28, 2018

This PR is similar to #69, but should be more flexible in that you can store many offsets as variables and use any of them in any of the other parsers.

My use case is .uasset files, where there is an absolute byte offset stored in the file as an integer - I need to seek to the absolute position from an arbitrary offset, thus I need the "current" offset stored as a variable that a subsequent call to skip() can access.

I have added documentation and test cases.

Thank you for your time and effort.

@Toxicable
Copy link
Contributor

I think this is a better approach than my breaking change here: #86

Our use case for this is to check that we read the correct amount of bytes out of the buffer.
Or in other words, to make sure we didn't under-read form the input.

Would be good if we could update this to be equal with master

@Toxicable Toxicable mentioned this pull request Jun 4, 2019
@ayan4m1 ayan4m1 closed this Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants