It seems a couple folks are using this library in a Read - Modify Some Elements - Write back out type of pipeline. In this case, if not all elements are inspected or modified, we may be able to optimize writes of those elements that are not modified (without loading them into memory).
If this is a common enough use case where people will benefit from this kind of optimization, we can consider introducing a Mutation API where the user passes in some struct meeting the Mutator (we can reconsider the naming) interface that has a TagsToMutate and Mutate functions to dictate how to modify the tags that need to be modified.
It seems a couple folks are using this library in a Read - Modify Some Elements - Write back out type of pipeline. In this case, if not all elements are inspected or modified, we may be able to optimize writes of those elements that are not modified (without loading them into memory).
If this is a common enough use case where people will benefit from this kind of optimization, we can consider introducing a Mutation API where the user passes in some struct meeting the Mutator (we can reconsider the naming) interface that has a
TagsToMutate
andMutate
functions to dictate how to modify the tags that need to be modified.We may wish to offer the option to also have a
TagsToSkip
version where elements are sent toMutate
except for those in TagsToSkip.