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

Archive modification and creation #2

Open
maxton opened this issue Aug 26, 2016 · 1 comment
Open

Archive modification and creation #2

maxton opened this issue Aug 26, 2016 · 1 comment

Comments

@maxton
Copy link
Owner

maxton commented Aug 26, 2016

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:

  • Replacing a file in a non-compressed archive with a file of equal or lesser size
  • Renaming a file in some archives with a filename of equal or lesser size
  • Deleting a file in some kinds of archives
  • Adding a file, in archives that come with extra space by default (like ISO images)

Potential rebuilding changes:

  • Adding a file or directory in most archives
  • Replacing a file with a file of greater size
  • Deleting a file in some kinds of archives

Roadmap

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
Copy link

szymmirr commented Oct 28, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants