Skip to content

feat(core): implement BinaryFileReader for safe and efficient binary I/O - #2

Merged
Dev-Sams1012 merged 1 commit into
mainfrom
feat/core/BinaryFileReader
Jul 27, 2026
Merged

Dev-Sams1012 merged 1 commit into
mainfrom
feat/core/BinaryFileReader

Conversation

@Dev-Sams1012

Copy link
Copy Markdown
Owner
  • Add BinaryFileReader class to manage binary files using RAII (std::ifstream).
  • Enforce std::ios::binary flag to prevent silent data corruption during ROM parsing.
  • Implement read_at() for targeted offset reading.
  • Implement read_next_chunk() for block-based reading to process large files without exhausting RAM.
  • Utilize std::filesystem::file_size for total size tracking.
  • Throw std::runtime_error on file open failure to guarantee fail-safe operations.

@Dev-Sams1012 Dev-Sams1012 self-assigned this Jul 27, 2026
@Dev-Sams1012
Dev-Sams1012 force-pushed the feat/core/BinaryFileReader branch from c047a2e to 6f2af82 Compare July 27, 2026 01:29
- Add `BinaryFileReader` class to manage binary files using RAII (`std::ifstream`).
- Enforce `std::ios::binary` flag to prevent silent data corruption during ROM parsing.
- Implement `read_at()` for targeted offset reading.
- Implement `read_next_chunk()` for block-based reading to process large files without exhausting RAM.
- Utilize `std::filesystem::file_size` for total size tracking.
- Throw `std::runtime_error` on file open failure to guarantee fail-safe operations.
@Dev-Sams1012
Dev-Sams1012 merged commit 167a40a into main Jul 27, 2026
1 check passed
@Dev-Sams1012
Dev-Sams1012 deleted the feat/core/BinaryFileReader branch July 27, 2026 01:38
@Dev-Sams1012 Dev-Sams1012 added the enhancement New feature or request label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant