maxton / GameArchives

A C# library for reading several video game archive formats, and a sample file explorer.
GNU Lesser General Public License v3.0
95 stars 20 forks source link

Archive modification and creation #2

Open maxton opened 8 years ago

maxton commented 8 years ago

This is definitely a feature that users want in a library like this. Modification of existing archives and the creation of new archives are much more complex than simple reading and extraction. I have a few ideas about how this should be implemented in a clean and mostly format-neutral way.

Changesets

For modification of archives, I have the idea of changesets, essentially sequential operations to be done on the archive. Think of how GParted works: you can manipulate your partitions and each change adds an item to a list of changes, then at the end you apply the changes.

Changes can be split into two types: those which require re-building the archive and those which can be done "in-place". Of course, some changes may be doable in-place in some kinds of archive but only by rebuilding in others, so not all changes are equal.

Some potential in-place changes:

Potential rebuilding changes:

Naturally, the in-place changes will be easier to implement, while the rebuilding changes require essentially creating a new archive from scratch. I think that first the in-place changes will be implemented, then archive creation will be implemented, then re-building changes will be implemented. I won't put a solid timeframe on anything since this is purely a free-time project, but I hope to get this functionality working within the next few months.

This is of course an open-source project so any suggestions or code contributions are always welcome

szymmirr commented 7 years ago

That would be very useful. It's suspected there are unused drum charts hidden within GH Live iOS archives and these might be playable just by swapping guitar chart with drum one