rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
200 stars 10 forks source link

Option to skip offset-based looking for files #60

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

When all data being scanned has already been extracted into individual files, it's usually not necessary to scan the file at every possible offset with each parser. Adding a startup option to only scan at offset 0 will make scanning much faster.

Command line options:

-nooffset    : Don't scan for file formats beyond offset 0.

While looking at how each parser implements the same offset scanning behavior, I think it may be best to refactor them all to extend some type of OffsetReader base class that automatically handles this for them. This would also make it easier to allow disabling offset-based scanning for each parser without code duplication.