Skip to content

Conversation

@cruglet
Copy link
Contributor

@cruglet cruglet commented May 12, 2025

This adds a advance(offset) method to FileAccess, providing a more readable & streamlined way to move the file cursor forward/backward. Unless I'm missing something, the only way to do this is by manually calling seek(file.get_position() + amount), which feels unnecessarily verbose for an operation like this. While you can also use methods like get_32() or get_buffer() to advance the cursor, these actually read data into memory, which is something that can negatively impact performance when skipping over large segments (it's also not very explicit that these functions do that). This method offers a more readable and purpose-specific alternative.

@cruglet cruglet requested review from a team as code owners May 12, 2025 15:21
@Chaosus Chaosus added this to the 4.x milestone May 14, 2025
@cruglet cruglet force-pushed the fileaccess-advance branch from 8198525 to d722155 Compare November 3, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants