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
In a project I'm using pgn_reader it'd be very useful if I could get the byte offset where the PGN of a game starts, so that I can seek on the handle to a large PGN file and read only that game.
I've had a peek at the code, and as far as I can make out implementing this requires two changes:
Changing or extending the Visitor trait, either adding an offset parameter to begin_game() or adding a new callback which is called between begin_game() and begin_headers()
Adding a member to BufferedReader keeping track of the current position in the file. From the design of the code, I think the only place the variable needs to be updated is in consume().
Does this sound like a reasonable feature? If so, I'd be happy to pitch in and submit a pull request implementing it.
The text was updated successfully, but these errors were encountered:
In a project I'm using pgn_reader it'd be very useful if I could get the byte offset where the PGN of a game starts, so that I can seek on the handle to a large PGN file and read only that game.
I've had a peek at the code, and as far as I can make out implementing this requires two changes:
begin_game()
or adding a new callback which is called betweenbegin_game()
andbegin_headers()
consume()
.Does this sound like a reasonable feature? If so, I'd be happy to pitch in and submit a pull request implementing it.
The text was updated successfully, but these errors were encountered: