Support magic numbers for Danganronpa formats #24
Labels
community
This issue features the broader community of Danganronpa modding, rather than just Spiral
enhancement
Currently, there are a number of formats that don't have proper methods of identifying them. Formats such as the Pak and Lin formats often find themselves registering false positives on completely unrelated files. In the event of file identification, this presents a problem - is a file actually a pak file, or is it just data that looks like a pak file?
Especially when working with large data sets, our options are limited. Currently, Spiral uses a set of "reasonable" boundaries that files must fit in, that tries to reject bad data. However, this isn't always accurate, and can be a bit slower than desired. Magic numbers allow us to immediately identify that a file is the format in question, whereas the boundaries allow us to guess that a file is probably the format.
Starting with the merge of #23, Spiral will (by default) use these new magic numbers for formats that traditionally didn't have them, using Binary Spiral Templates. This will break compatibility with other tools. Existing tools will need to be updated to support these magic numbers or users will need to use the compatibility extract flag.
For developers: These magic numbers are available here. In most cases, simply peeking at the first four bytes and skipping them if it matches will work.
The text was updated successfully, but these errors were encountered: