Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Add dependency byteorder #15

Merged
merged 3 commits into from
Jan 20, 2023
Merged

Conversation

ev3nvy
Copy link
Owner

@ev3nvy ev3nvy commented Jan 20, 2023

This PR removes the custom Cursor class and replaces it with methods provided by byteorder.

This was done because the little amount of reading we do ourselves is so small that having an entire custom class to do it was excessive. Another reason is to not reinvent the wheel. :^)

Because all of the reading is now handled by byteorder, error class was also simplified by removing CursorError and ReadError, as they would now be excessive and throwing correct errors would introduce a lot of boilerplate code everywhere.

Further optimization to be done is to use BufReader wherever possible.

This removes the entire Cursor class along with the structs directory,
replaces the previous read methods with the ones from byteorder and
removes now excessive error classes.
@ev3nvy ev3nvy force-pushed the add-dependency-byteorder branch from 7345ca4 to 01d0d10 Compare January 20, 2023 18:28
@ev3nvy ev3nvy merged commit d7abfaf into develop Jan 20, 2023
@ev3nvy ev3nvy added this to the v0.1.0 milestone Jan 20, 2023
@ev3nvy ev3nvy added dependencies Issue or pull request related to updating or changing dependencies type: chore Updating grunt tasks status: completed Issue was resolved, or pull request was merged labels Jan 20, 2023
@ev3nvy ev3nvy deleted the add-dependency-byteorder branch January 21, 2023 14:47
@ev3nvy ev3nvy added type: refactor Issue or pull request related to code refactoring and removed dependencies Issue or pull request related to updating or changing dependencies type: chore Updating grunt tasks labels Jan 22, 2023
@ev3nvy ev3nvy changed the title Add dependency byteorder refactor: Add dependency byteorder Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: completed Issue was resolved, or pull request was merged type: refactor Issue or pull request related to code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant